--- title: Card desc: Flexible and extensible content container with multiple variants and options. ico: mdi:card-text keywords: - container controls: - name: title type: text label: Title desc: Card header title default: 'Card header' - name: body type: text label: Body desc: Card body content default: 'Lorem ipsum' - name: bordered type: toggle label: Bordered desc: Add a border around the entire card. default: false - name: action type: toggle label: Actionable desc: Show action placeholders. default: false - name: collapse type: toggle label: Collapsible desc: NOT compatible with Actionable. Allows the card body to collapse by clicking on the header. This works just like details/summary tags but with a smoother animation. default: false - name: collapseIndent type: toggle label: Collapsible Indent desc: ONLY compatible with Collapsible. Indents the body content to line up with the header text (minus the chevron). default: false previewHeight: 25 preview: |

code: html: |
<{aTag}{aAttr} class="prs-card-header"> {chevron}
{title}
{cWrapStart}{cSpace}
{cSpace}

{body}

{cSpace}
{cWrapEnd}{actionBlock}
logic: title: "this.title" body: "this.body" bordered: "this.bordered ? ' prs-card-bordered' : ''" action: "this.action ? ' prs-card-action' : ''" actionBlock: "this.action ? '\\n
...
' : ''" collapse: "this.collapse ? ' prs-card-collapse' : ''" collapseIndent: "this.collapseIndent ? ' prs-card-indent' : ''" aTag: "this.collapse ? 'a' : 'div'" aAttr: "this.collapse ? ' href=\"#\" onClick=\"{handleCollapse}\"' : ''" cWrapStart: "this.collapse ? '
\\n ' : ''" cWrapEnd: "this.collapse ? '\\n
' : ''" cSpace: "this.collapse ? ' ' : ''" chevron: "this.collapse ? '
\\n ' : ''" ---