A container that groups related content.
A port of the Pines card.
<.card title="Billing" subtitle="Manage your plan">
<p>Card body</p>
<:footer><.button>Save</.button></:footer>
</.card>
Summary
Layout
Renders a card.
Layout
Renders a card.
Examples
<.card title="Team members" subtitle="Invite your colleagues">
<ul>...</ul>
<:footer>
<.button size="sm">Invite</.button>
</:footer>
</.card>
<.card interactive phx-click="open" phx-value-id={@id}>
<h3>Clickable card</h3>
</.card>Attributes
title(:string) - Heading text. This shadows the HTMLtitleattribute; to set a native tooltip passrest={%{title: "..."}}.Defaults to
nil.subtitle(:string) - Defaults tonil.padded(:boolean) - Applies default padding to the body. Defaults totrue.interactive(:boolean) - Adds hover elevation and a pointer cursor. Pair withphx-clickor wrap in a link. Defaults tofalse.class(:string) - Defaults tonil.header_class(:string) - Replaces the header's own classes. Defaults tonil.body_class(:string) - Defaults tonil.footer_class(:string) - Defaults tonil.Global attributes are accepted.
Slots
inner_block(required)header- Replaces the generated title/subtitle header entirely.footer