Card

Plain, shadcn-compatible Card building block (CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter) with default, outline, elevated and interactive variants — the interactive one lifts on hover and dips on press and becomes a whole-card link or button via asChild — plus an optional height-morphing CardExpandTrigger/CardExpandContent disclosure.

Preview

Card preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/card
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

CardHeader

className?
string
—

CardTitle

className?
string
—

CardDescription

className?
string
—

CardAction

className?
string
—

CardContent

className?
string
—

CardFooter

className?
string
—

CardExpandTrigger

hideIcon?
boolean

Hide the rotating chevron.

false
className?
string
—

CardExpandContent

className?
string
—

Card

variant?
"outline" | "default" | "elevated" | "interactive"
default
asChild?
boolean

Merge the card surface onto the single child element instead of rendering a `<div>` — e.g. `<Card variant="interactive" asChild><a href="…">…</a></Card>` or a router `<Link>` / `<button>`. Keep other links and buttons out of an interactive card's children so interactive elements never nest.

false
expanded?
boolean

Controlled open state for `CardExpandTrigger` / `CardExpandContent`.

—
defaultExpanded?
boolean
false
onExpandedChange?
((expanded: boolean) => void)
—
className?
string
—

Updated