Accordion Examples
21 accordions: FAQs with chevrons or plus/minus toggles at either end, icon and subtitle rows, separate card-style sections, nested multi-level lists and sectioned forms. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every accordion example
21 examples.
- Accordion Form with Icon SectionsFormA form split into Personal Information, Contact Information, and Address Information, each led by an icon.

- Accordion Form with Plus/Minus ToggleFormThe same personal, contact, and address form, with a plus on each section that turns into a minus.

- Accordion with Category IconsStandardA bordered accordion of Documents, Projects, Workspace settings, and Team members, each led by an icon.

- Accordion with Icon, Subtitle, and ChevronSubtitleWorkspace rows with an icon, a title, a muted subtitle, and the chevron on the right. Documents starts open.

- Accordion with Icons and Plus/Minus ToggleStandardWorkspace rows with a category icon and a plus that turns into a minus, with Documents open first.

- Accordion with Icons and Subtitle TextSubtitleWorkspace rows that pair a category icon with a title and a muted subtitle, chevron on the right.

- Accordion with Left ChevronStandardA shipping FAQ with the chevron before each question. When will my order ship? starts open.

- Accordion with Left Plus/Minus ToggleStandardAn onboarding accordion with a plus before each step. Create your workspace starts open first.

- Accordion with Plus/Minus ToggleStandardA billing FAQ with a plus on the right of each question. The payment-methods question starts open.

- Accordion with Subtitle and Plus/Minus ToggleSubtitleHelp topics with a title, a muted subtitle, and a plus that turns into a minus. Getting started is open.

- Accordion with Subtitle TextSubtitleHelp topics whose triggers show a title over a muted subtitle, with the chevron on the right.

- Full Featured AccordionStandardWorkspace rows with a category icon, a title, a muted subtitle, and a plus that turns into a minus.

Or describe it. With Pro, your AI agent installs the accordion example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Accordion examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
shadcn.io's Accordion is a stack of sections, each a trigger that shows or hides its content. It comes with AccordionItem, AccordionTrigger and AccordionContent parts, draws a chevron on each trigger, animates the content open and closed, and handles keyboard navigation between triggers. Each example in this gallery is one small file built from those parts.
Yes. Every example is free to use in personal and commercial projects, with no attribution required. Seeing the code and installing an example takes a free shadcn.io account.
The component gives you the parts and the behavior. The examples show what to build with them: FAQs, plus/minus toggles in place of the chevron, toggles at the start of the row, icons and subtitles in the trigger, separate cards, nested levels and forms in sections. You still own the code and change any of it.
An accordion when readers scan a list of headings and open the few they need, such as FAQs, or on narrow screens. Tabs when the sections are parallel views of the same thing and readers switch between them. If everything should be read, don't hide it: show it.
The standard accordion with the chevron is the usual choice. The plus/minus examples make the toggle easier to spot, and the card-style ones separate each question. Start with the first question open if it's the one most people ask.
Put Collapsible rows, or another Accordion, inside AccordionContent. The multi-level examples use collapsibles for the inner level, so each article opens on its own while only one topic is open at a time.
One section at a time is the default. Each library names the option its own way (multiple on Ark UI and Base UI, type multiple on Radix UI, allowsMultipleExpanded on React Aria), and every example's code uses the right props for the page you're on.
Yes. Hide the built-in icon from the trigger's class and put your own icons in the trigger, styled from the trigger's expanded state, as the plus/minus examples do. To move the toggle to the start, reverse the trigger's row or put your icon first.
Sign in with a free account, open the example and run the install command under Installation. The CLI adds the example's file to your project along with the Accordion component, and Collapsible or Input when the example uses them.
Control the accordion: pass the open values and update them in the change handler. Most examples open one section with a default value, so switching to a controlled value is a small change to that prop.
It depends on the library: some remove closed content and some keep it hidden. The form examples ask every library to keep closed sections mounted, so typed values survive and every field still submits with the form.
AccordionContent animates its height from the content's measured size. Change the duration or easing in the accordion file in your project.
shadcn.io's Accordion, with Collapsible and Input in some examples, styled with Tailwind CSS and Lucide icons. In React it's built on Base UI, React Aria, Ark UI or Radix UI, whichever your project uses; the Vue, Svelte and Solid versions are built on Ark UI.
Yes. Each trigger is a button that reports whether its section is expanded and which content it controls, and Enter or Space toggles it. Icons are decorative and hidden from screen readers, so the title is the trigger's name.
Yes. They render on the server with the default sections open, and the triggers become interactive in the browser.
Tailwind CSS v4. The classes are standard utilities and theme tokens such as bg-background and text-muted-foreground, read from your theme's CSS variables.
4.9 out of 5 from 150+ developers
Every accordion example. One prompt away.
Every accordion example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro



















