shadcn.io is not affiliated with official shadcn/ui
Collapsible examples · Outline
Outlined Collapsible for React
A box with a thick outline and a System Information header that expands to its version, status and last update.
A strong outline for a block of facts. System Information opens to the version, the status and the last update, each a bold label with its value. Use it in about panels, admin screens and support pages.
Preview
Installation
FAQ
Where does the thick border sit?
Collapsible has rounded-md border-2, and CollapsibleContent has border-t-2, so the divider matches the outline's weight.
How are Version, Status, and Last Updated written?
They come from the info list at the top of the file, in a flex flex-col gap-2 column. Each row is a bold label with a colon, then its value in the muted color.
Does the chevron rotate?
Yes. The trigger has the group class and sets aria-expanded while open, so group-aria-expanded:rotate-180 on ChevronDownIcon turns it, eased by transition-transform duration-200.
Related
- Dashed Outline CollapsibleA dashed-outline box of optional
- Warning Outline CollapsibleA warning-tinted box with a warning icon
- Info Box Outline CollapsibleAn info-tinted box with an info icon and
- Card CollapsibleA card with a Features header that
- Simple CollapsibleA ghost Toggle button with a chevron that
- Standard Accordion with ChevronA bordered accordion of three questions