Collapsible
Shows or hides one section under its trigger, with the same height animation as Accordion.
@naruto starred 3 repositories
rasengan-dev/rasengan
rasengan-dev/rasengan-ui
rasengan-dev/sharingan
Installation
Or with the shadcn CLI, from the registry:
Usage
Villages
Only the trigger and the content are styled by you; the panel's height follows the village's motion.
@naruto starred 3 repositories
rasengan-dev/rasengan
rasengan-dev/rasengan-ui
rasengan-dev/sharingan
@naruto starred 3 repositories
rasengan-dev/rasengan
rasengan-dev/rasengan-ui
rasengan-dev/sharingan
@naruto starred 3 repositories
rasengan-dev/rasengan
rasengan-dev/rasengan-ui
rasengan-dev/sharingan
@naruto starred 3 repositories
rasengan-dev/rasengan
rasengan-dev/rasengan-ui
rasengan-dev/sharingan
@naruto starred 3 repositories
rasengan-dev/rasengan
rasengan-dev/rasengan-ui
rasengan-dev/sharingan
@naruto starred 3 repositories
rasengan-dev/rasengan
rasengan-dev/rasengan-ui
rasengan-dev/sharingan
Accessibility
- The trigger is a button with
aria-expandedandaria-controls; Enter or Space toggles it.
API reference
The parts of Base UI's Collapsible:
| Part | Notes |
|---|---|
Collapsible | open, defaultOpen, onOpenChange, disabled |
CollapsibleTrigger | render to use a Button |
CollapsibleContent | the panel; keepMounted, hiddenUntilFound |