Measured entry

shadcn-accordion

accordionunclassified

A client-side React accordion shipped as shadcn registry source rather than a standalone widget package. It wraps the Radix UI accordion primitives, adds a Lucide chevron, and relies on the shared cn helper plus Tailwind utility, theme, state, and animation classes.

Specimen
Harness screenshot of shadcn-accordion at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of shadcn-accordion at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-accordion at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-accordion
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal35.8 KB (101.2 KB build, 65.4 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 35.77s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/components/ui/accordion.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

A sound choice inside an existing shadcn codebase: it builds, mounts, and passes the automated accessibility scan. It needs a shadcn-style setup, and teams should fix the narrow-screen overflow and weigh the added dependency cost before shipping.

Use it if

  • You already use shadcn conventions and want an accordion that remains easy to edit locally.
  • You need accessible disclosure behavior supplied by Radix primitives without adding a provider.
  • You want single or multiple expansion modes with controlled and uncontrolled React state support.

Skip it if

  • Your project does not use Tailwind and you do not want to recreate the styling and animation rules.
  • You need a dependency-light disclosure because the added Radix code is too costly for this interaction.
  • Your narrow layout cannot tolerate the observed horizontal overflow without further styling work.
  • You want a drop-in package that works without shadcn aliases and shared utilities.

Install

Installation record for shadcn-accordion
Declared dependenciesradix-ui
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, add Radix UI and Lucide React, provide the cn class-merging helper or replace its calls, configure the import alias, and supply the Tailwind theme tokens and open and close animation utilities used by the source.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-14

Alternatives

Other published entries for the accordion pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.