Collapsible

Expandable section that reveals extra details in place. The panel opens smoothly, its contents can fade in row by row, and closing folds everything neatly away.

Preview

Installation

npx @lumioui/cli add collapsible

Usage

import { Collapsible, CollapsibleTrigger, CollapsibleContent, CollapsibleItem } from "@/components/ui/collapsible/collapsible";
<Collapsible />

Also exported: CollapsibleTrigger, CollapsibleContent, CollapsibleItem.

Examples

Order Details

A grocery order receipt: the item list and the delivery notes fold away under their summary rows, so the total stays in view.

API reference

Collapsible

Prop Type Default
open boolean

Controlled open state.

—
defaultOpen boolean

Uncontrolled initial state.

false
onOpenChange (open: boolean) => void —
className string —

CollapsibleTrigger

Prop Type Default
children* React.ReactNode —
hideChevron boolean

Hide the chevron.

—
className string —

CollapsibleContent

Prop Type Default
className string —

CollapsibleItem

Prop Type Default
index* number

Reading-order position inside the content — sets the 40ms ignite step.

—
className string —