Animated Collapsible

Expandable content with a smooth reveal.

Preview

Install

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

$ bunx --bun shadcn add @beui/collapsible

API Reference

Collapsible

open?
boolean
—
defaultOpen?
boolean
false
onOpenChange?
((open: boolean) => void)
—
disabled?
boolean
false
contentClassName?
string

Layout classes for the inner wrapper, separate from the animated surface.

—
className?
string
—

CollapsibleTrigger

render?
ReactElement<unknown, string | JSXElementConstructor<any>>

Reuse a button element or a component that forwards its props and ref to a button.

—
className?
string
—

CollapsibleContent

contentClassName?
string

Padding and layout classes for the measured content, inside the clipping wrapper.

—
className?
string
—

CollapsibleIndicator

className?
string
—

Updated