shadcn.io is not affiliated with official shadcn/ui
Accordion examples · Tabs
Tab-Style Accordion with Left Plus Trigger for React
An accordion of integration questions drawn as separate rounded cards, with a plus/minus toggle at the start of each trigger.
Rounded cards for each integration question, with a plus/minus toggle at the start of the trigger in place of the chevron. This React accordion keeps a gap between cards so each reads as its own block. Use it for setup guides and integration FAQs.
Preview
Installation
FAQ
How are the sections separated?
Accordion is flex flex-col gap-2. Each AccordionItem has its own rounded-lg border and px-4.
How does the plus end up before the title?
The plus and minus sit in a relative size-4 box, the first child of a gap-3 row, with the title after it in flex-1 text-start. **:data-[slot=accordion-trigger-icon]:hidden hides the built-in chevron. group-aria-expanded/accordion-trigger fades the plus out and the minus in over duration-200, and both icons are aria-hidden.
Why is the answer indented?
ps-7 on AccordionContent matches the 16px icon plus the 12px gap-3, so the answer lines up under the title.
Why does the integrations question start open?
defaultValue={["available"]} opens the integrations question on first render. The string matches that item's value.
Related
- Tab-Style AccordionAn accordion of account questions drawn
- Tab-Style Accordion with Plus TriggerAn accordion of team questions drawn as
- Accordion with Left Plus/Minus ToggleA bordered accordion of onboarding steps
- Tab-Style Accordion with Left ChevronAn accordion of security questions drawn
- Card CollapsibleA card with a Features header that
- Standard Accordion with ChevronA bordered accordion of three questions