Components
Card
Content surface for panels, tiles, and settings groups.
Composition
Panel anatomy
- <Card>
- <CardHeader>
- <CardTitle />
- <CardDescription />
- <CardAction />
- <CardContent />
- <CardFooter />
- <CardHeader>
Clickable card
CardLink turns the whole card into its hit area: the card paints --cui-card-hover-background on hover and the focus ring while the link has focus. It renders a button; pass render={<a href />} to navigate. Other buttons, links, inputs, and checkboxes in the card stay clickable above it.
- <Card>
- <CardHeader>
- <CardTitle>
- <CardLink />
- <CardDescription />
- <CardTitle>
- <CardContent />
- <CardHeader>
Installation
The Control UI source installs this component from src/registry/sources/control-ui/ui/card.tsx.
Raw code
Primary installed source
Knobs
Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.
--cui-card-* · 13 knobsHow the cascade resolves--cui-card-radius<length-percentage>var(--radius-panel)--cui-card-background<color>var(--card)--cui-card-foreground<color>var(--card-foreground)--cui-card-section-border-color<color>oklch(from var(--border) l c h / 0.7)--cui-card-hover-background<color>var(--hover-fill)--cui-card-border-color<color>var(--border)--cui-card-border-width<length>var(--control-rim-width)--cui-card-shadow*var(--shadow-sm)--cui-card-backdrop-filter*none--cui-card-padding-block<length-percentage>calc(var(--spacing) * 6)--cui-card-padding-inline<length-percentage>calc(var(--spacing) * 6)--cui-card-gap<length-percentage>calc(var(--spacing) * 6)--cui-card-title-font-size<length-percentage>1em