shadcn.io is not affiliated with official shadcn/ui
Collapsible examples · Standard
Text-only Collapsible for React
A Settings heading with a bracketed expand trigger beside it that reveals three option rows.
No icons, no button styles: a Settings heading with a muted [expand] trigger beside it, which reveals three bordered option rows. Use it for minimal layouts and dense settings pages where a quiet control fits better than a button.
Preview
Installation
FAQ
Does the Settings heading toggle the list?
No. The h4 sits beside the trigger in a flex items-center gap-2 row, and only [expand] toggles the options.
How is the expand control styled?
text-muted-foreground text-sm, with hover:underline and underline-offset-4. It has aria-label="Expand settings", so screen readers hear what it expands rather than the brackets.
How are Option 1, Option 2, and Option 3 drawn?
Each is a div with rounded-md border px-4 py-2 text-sm, from the options list at the top of the file. CollapsibleContent is a flex flex-col gap-2 column.
Related
- Collapsible with IconA Show more information trigger with a
- Inline Trigger CollapsibleA question with an up-down chevron at the
- Simple CollapsibleA ghost Toggle button with a chevron that
- Minimal Sidebar Group CollapsibleA sidebar group with a small uppercase
- Dashed Outline CollapsibleA dashed-outline box of optional
- Standard Accordion with ChevronA bordered accordion of three questions