Expandable Card
A compound card-dialog component for composing a compact trigger and a fully custom expanded experience with shared-layout motion.
Installation
npx shadcn@latest add @navui/expandable-cardUsage
Compose a compact trigger and expanded content within one card. Include a title, description, and explicit close action in the expanded view.
API reference
Custom NavUI card composition. UI SDK Dialog provides its accessible dialog lifecycle.
| Prop | Type | Default | Description |
|---|---|---|---|
ExpandableCardTrigger / Content | UI SDK trigger/content props | โ | Card styling and shared-layout motion with SDK-owned dialog lifecycle. Content also takes showCloseButton, closeLabel, overlayClassName. |
ExpandableCardMedia | Motion span props | โ | Optional shared media paired by the root, disabled under reduced motion. |
Header / Title / Description / Body / Footer / Close | Composable part props | โ | Name and describe every dialog. Close uses SDK render and action. |
Accessibility
- SDK Dialog owns modal behavior, focus return, Escape, and presence. Motion only provides the paired card/media layout effect; reduced motion removes that effect.