Collapsible
An interactive component which expands and collapses a panel. Built on Base UI's collapsible primitive.
Last updated January 1, 1980
CreditsUnchangedPublished
Copied from shadcn/ui.
Overview
Installation
Usage
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/ui/collapsible"
export function Example() {
return (
<Collapsible>
<CollapsibleTrigger>Can I use this in my project?</CollapsibleTrigger>
<CollapsibleContent>
Yes. Free to use for personal and commercial projects.
</CollapsibleContent>
</Collapsible>
)
}Examples
RTL
API Reference
Collapsible
API reference: Base UI Collapsible .