shadcn.io is not affiliated with official shadcn/ui
Accordion examples · Tabs
Tab-Style Accordion with Left Chevron for React
An accordion of security questions drawn as separate rounded cards, with the chevron at the start of each trigger.
Separate rounded cards with the chevron in front. This React accordion reverses each trigger's row so the built-in chevron comes before the security question, and the cards keep a gap between them. Use it for settings and navigation panels where the toggle should lead.
Preview
Installation
FAQ
How are the sections separated?
Accordion is flex flex-col gap-2. Each AccordionItem has its own rounded-lg border, with no horizontal padding on the item.
How does the chevron move to the start of the card?
flex-row-reverse on AccordionTrigger places the built-in chevron before the title, with gap-3 between them. The trigger sets px-4 py-3 and hover:no-underline, and the title is flex-1 text-start.
Why does the answer use ps-11?
ps-11 lines the answer up under the title: the trigger padding, the chevron, and gap-3. The content also sets px-4 and pb-4.
Why does the single sign-on question start open?
defaultValue={["sso"]} opens the single sign-on question on first render. The string matches that item's value.
Related
- Tab-Style AccordionAn accordion of account questions drawn
- Accordion with Left ChevronA bordered accordion of shipping
- Tab-Style Accordion with Left Plus TriggerAn accordion of integration questions
- Tab-Style Accordion with Plus TriggerAn accordion of team questions drawn as
- Card CollapsibleA card with a Features header that
- Standard Accordion with ChevronA bordered accordion of three questions