shadcn.io is not affiliated with official shadcn/ui
Collapsible examples · Outline
Info Box Outline Collapsible for React
An info-tinted box with an info icon and an Important Notice header that expands to the message.
A notice that stays short until someone wants the details. The box is tinted and outlined with the theme's info color, the trigger pairs an info icon with Important Notice, and the message opens under a divider in the same color. Use it for context, tips and announcements.
Preview
Installation
FAQ
Which classes paint the info box?
Collapsible uses border-2 border-info/32 bg-info/4: a faint tint and a stronger border from the theme's --info color, the same mix as an info Alert. The icon is text-info, so light and dark mode follow the theme.
Does the answer use the same border colors?
Yes. CollapsibleContent has border-t-2 border-info/32, and the message is text-muted-foreground text-sm.
What is inside the trigger?
InfoIcon at size-5 and the Important Notice title, in a flex items-center gap-3 p-4 row that fills the box.
Related
- Warning Outline CollapsibleA warning-tinted box with a warning icon
- Outlined CollapsibleA box with a thick outline and a System
- Info with Title AlertAn info alert with only a title, for a
- Card with Icon Header CollapsibleA card whose header has an icon tile, a
- Accordion with Category IconsAn accordion of workspace sections, each
- FAQ Card Style CollapsibleAn FAQ question in a card with a hover