Home Components Accordion
React Accordion Components
16 free React accordions built with Tailwind CSS and shadcn/ui conventions. Copy the code or install with the shadcn CLI. Great for FAQ lists, settings panels, and nested navigation.
Accordion 1 : FAQ accordion with the chevron moved to the left of each question and indented answers.Accordion 2 : Accordion of separate card panels with soft shadows that deepen when a panel is open.Accordion 3 : Payments FAQ accordion with a muted icon before each question, such as wallet and shield.Accordion 4 : Card-style accordion panels using a plus icon that switches to a minus when expanded.Accordion 5 : Accordion that turns the open item's title, chevron and bottom border blue.Accordion 6 : Healthcare FAQ accordion with a leading plus or minus toggle followed by a topic icon.Accordion 7 : Team accordion where each row shows an avatar, name and role, revealing a note when opened.Accordion 8 : Accordion with a boxed icon, title and subtitle per row and a plus that rotates into an X.Accordion 9 : Bordered card accordion with a right-pointing chevron on the left that turns down when open.Accordion 10 : Single bordered accordion box with plus and minus toggles and a blue title for open items.Accordion 11 : Accordion of bordered panels that get a light grey fill and up chevron when expanded.Accordion 12 : Borderless accordion panels that gain a border and shadow only while they are open.Accordion 13 : Accordion with round icon badges where each opened item reveals text and a cover image.Accordion 14 : Accordion panels with a circular outlined button that switches from plus to X when open.Accordion 15 : Two-level FAQ accordion with icon categories, each holding its own collapsible questions.Accordion 16 : Nested FAQ accordion of plain categories with inner questions that highlight grey when open.
About React Accordion Components A React accordion is a stack of headings that each expand to reveal a panel of content. Watermelon UI accordions are built on Radix UI primitives with Tailwind CSS, so they are keyboard accessible and support single or multiple open items. Add one with the shadcn CLI, then edit the Tailwind classes to match your design.
When to use it FAQ sections where each answer should stay hidden until asked for. Settings or filter panels with groups the user only needs one at a time. Long documentation or changelog pages that need to scan quickly. When to use something else Use Tabs when the sections are peers the user switches between, not a list to scan. Use Collapsible when there is a single show-more region rather than a list of items. Use Dialog when the hidden content needs the user’s full attention. Frequently asked questions How do I make a shadcn accordion open by default? Pass the item value to defaultValue on the Accordion root, for example defaultValue="item-1". For type="multiple", pass an array of values instead.
Can more than one accordion item be open at once? Yes. Set type="multiple" on the Accordion root; type="single" keeps only one item open, and collapsible lets the open one close again.
Why is my shadcn accordion animation not working? Check that your global CSS has @import "tw-animate-css" after @import "tailwindcss", because the animate-accordion-down and animate-accordion-up classes come from it. Its keyframes animate to --radix-accordion-content-height, which Radix measures for each panel.
How do I change the shadcn accordion trigger icon? Edit AccordionTrigger in your accordion file and swap the icons it renders after its children. It shows a down chevron when closed and an up chevron when open using group-aria-expanded classes, so replace both, or keep one icon and add group-aria-expanded/accordion-trigger:rotate-180.
How to use React Accordion Components Start from a React project with Tailwind CSS and shadcn/ui set up. Next.js, Vite, Remix, and Astro all work. Run npx shadcn@latest add https://registry.watermelon.sh/r/accordion-1.json to add the source files to your project. Import it where you need it, then edit the Tailwind classes and design tokens to match your product. Dependencies installed with it: lucide-react, @radix-ui/react-accordion.
The code is yours: it lives in your repository, so there is no runtime package to keep updated. Watermelon UI is free and open source under the MIT license.
More: Free React components , UI library alternatives , guides .