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-card

Usage

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.

Component parts properties
PropTypeDefaultDescription
ExpandableCardTrigger / ContentUI SDK trigger/content propsโ€”Card styling and shared-layout motion with SDK-owned dialog lifecycle. Content also takes showCloseButton, closeLabel, overlayClassName.
ExpandableCardMediaMotion span propsโ€”Optional shared media paired by the root, disabled under reduced motion.
Header / Title / Description / Body / Footer / CloseComposable 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.