{{ title }}
{% if subtitle %}
{{ subtitle }}
{% end %}{% slot header_actions %}
{% slot media %}
{% slot %}
{% slot body_actions %}
{#- chirp-ui: Card component Headless card with optional header, footer, collapsible, and variants. Named slots: header_actions, media, body_actions (for list cards), default (body). Link variants also expose header_badge, header_subtitle, top_meta, and footer. Usage: from "chirpui/card.html" import card call card(title="My Card")
Card body content.
end call card(title="Settings", icon="⚙") {% slot header_actions %}{% end %}Body content.
end call card(title="Feature", variant="feature") {% slot media %}Body content.
end call card(title="Usage", attrs_map={"id": "usage-widget"})Stable id on the outer article for hx-target="#usage-widget".
end -#} {% def card(title=none, subtitle=none, footer=none, collapsible=false, open=false, variant="", icon=none, border_variant="", header_variant="", cls="", hoverable=false, attrs="", attrs_map=none) %} {% set variant_class = " chirpui-card--" ~ variant if variant else "" %} {% set border_class = " chirpui-card--gradient-border" if border_variant == "gradient" else "" %} {% set header_class = " chirpui-card--gradient-header" if header_variant == "gradient" else "" %} {% set hover_class = " chirpui-card--hoverable" if hoverable else "" %} {% if collapsible %}{{ subtitle }}
{% end %}{{ subtitle }}
{% end %}{{ subtitle }}
{% end %}{{ description }}
{% endif %} {% slot %}{{ description }}
{% endif %} {% slot %}