Collapsible
Data DisplayAn interactive component which expands/collapses a panel.
Import
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";Usage
Default
A collapsible panel with a trigger button.
@peduarte starred 3 repositories
@radix-ui/primitives
API Reference
defaultOpen—booleanThe open state of the collapsible when it is initially rendered
open—booleanThe controlled open state of the collapsible
onOpenChange—(open: boolean) => voidEvent handler called when the open state of the collapsible changes
disabledfalsebooleanWhether the collapsible is disabled
| Prop | Type | Default | Description |
|---|---|---|---|
defaultOpen | boolean | — | The open state of the collapsible when it is initially rendered |
open | boolean | — | The controlled open state of the collapsible |
onOpenChange | (open: boolean) => void | — | Event handler called when the open state of the collapsible changes |
disabled | boolean | false | Whether the collapsible is disabled |