{# @description Opinionated card: header (icon/title, badges, actions), body, footer. #} {# @prop title:text | default:"" | description:"Heading text." #} {# @prop icon:text | default:"" | description:"Leading icon name for the heading." #} {# @prop tight:boolean | description:"Remove body padding, for full-bleed tables/lists." #} {# @prop href:text | default:"" | description:"Make the whole card a link. The title is the one link, stretched over the card, so a click or tap anywhere on it opens the address, and it is the link's name for a keyboard or screen-reader user. Buttons, menus and links inside the card sit above it and keep working. Needs a title: without one no link is drawn." #} {# @prop class:text | description:"Extra classes on the .card surface." #} {# @prop body_class:text | description:"Extra classes on the .card-body." #} {# @slot Card body content — The main card content. #} {# @slot:badges Status, counts — Header, just after the title. #} {# @slot:actions Buttons, dropdown — Header, end-aligned. #} {# @slot:footer Footer content — Footer, start-aligned. #} {# @slot:footer_end Footer content — Footer, end-aligned. #} {% comment %} With an href the title's link grows an ::after over the whole card, and every other link, button or form control inside the card is lifted above it so it still takes its own click. The card is the positioned ancestor the overlay fills, and shows the keyboard focus the link itself does not draw. {% endcomment %}
{% if title or icon or badges or actions %}
{% if title or icon %}

{% if icon %}{% endif %} {% if title and href %} {{ title }} {% elif title %} {{ title }} {% endif %}

{% endif %} {% if badges %}
{{ badges }}
{% endif %} {% if actions %}
{{ actions }}
{% endif %}
{% endif %} {{ slot }} {% if footer or footer_end %}
{% if footer %}
{{ footer }}
{% endif %} {% if footer_end %}
{{ footer_end }}
{% endif %}
{% endif %}