Skip to content
Nana UI

Card

View .md Download

A surface container that groups related content. Compose it with nana-card-header, nana-card-title, nana-card-description, nana-card-content and nana-card-footer.

Card title A short supporting description. A card groups related content into a single surface. Action
Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/card";
<nana-card style="max-width:22rem">
<nana-card-header>
<nana-card-title>Card title</nana-card-title>
<nana-card-description>A short supporting description.</nana-card-description>
</nana-card-header>
<nana-card-content>A card groups related content into a single surface.</nana-card-content>
<nana-card-footer>
<nana-button size="sm">Action</nana-button>
</nana-card-footer>
</nana-card>

The variant attribute sets the card’s surface treatment — default, elevated, outlined, filled, or glass.

Default Elevated Outlined Filled Glass

Add the interactive attribute to make the whole card a hoverable, focusable target (e.g. a link card).

Interactive card Hover or focus me Lifts on hover and shows a focus ring.

Properties

PropertyAttributeTypeDefaultDescription
interactivebooleanfalseAdds hover lift, pointer cursor and a focus ring for clickable cards. Composes with any variant.
variantCardVariant'default'Visual style

Slots

SlotDescription
(default)Card sub-sections (header, content, footer)

CSS custom properties

PropertyDescription
--nana-card-bgBackground colour
--nana-card-colorText colour
--nana-card-radiusCorner radius
SlotDescription
(default)Card sub-sections (header, content, footer)
VariableDefaultDescription
--nana-card-bgBackground colour
--nana-card-colorText colour
--nana-card-radiusCorner radius
Explore Card interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook