shadcn.io is not affiliated with official shadcn/ui
Collapsible examples · Outline
Dashed Outline Collapsible for React
A dashed-outline box of optional configuration that expands to two option rows.
A dashed outline says this part is optional. The Optional Configuration header ends with a muted [expand] cue, and the content, under a dashed divider, lists two options and their state. Use it for advanced settings that most people can skip.
Preview
Installation
FAQ
Which parts use the dashed border?
Collapsible has rounded-lg border-2 border-dashed, and CollapsibleContent uses border-t-2 border-dashed, so the line above the options is dashed too.
What toggles Optional Configuration?
The whole header. The trigger is w-full, with the title and a muted [expand] cue in text-xs. That cue is part of the button's name.
How are Option A and Option B laid out?
They come from the options list at the top of the file, in a flex flex-col gap-3 column. Each row is flex items-center justify-between: the label in the muted color, the state at the end.
Related
- Outlined CollapsibleA box with a thick outline and a System
- Subtle Card CollapsibleA dashed, muted card with a View source
- Simple CollapsibleA ghost Toggle button with a chevron that
- Info Box Outline CollapsibleAn info-tinted box with an info icon and
- Standard Accordion with ChevronA bordered accordion of three questions
- FAQ Item CollapsibleAn FAQ question with a plus that turns