Measured entry

shadcn-collapsible

accordionunclassified

A client-side React wrapper around Radix UI's collapsible root, trigger, and content primitives. It ships as copy-in source from the shadcn registry, adds data-slot hooks, and depends on the radix-ui package. Styling and layout remain the consuming application's responsibility.

Specimen
Harness screenshot of shadcn-collapsible at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of shadcn-collapsible at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-collapsible 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-collapsible
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal22.1 KB (87.5 KB build, 65.4 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A dependable, intentionally thin disclosure primitive that builds and mounts cleanly without provider wiring. Choose it when Radix behavior plus local styling is the goal, but address narrow-screen overflow and do not mistake it for a complete accordion.

Use it if

  • You need an accessible disclosure for optional details, filters, or compact supporting content.
  • Your React app already uses Radix UI or is comfortable owning styles around unstyled primitives.
  • You want source-level control over a very small wrapper instead of a packaged visual component.

Skip it if

  • You need a full accordion with coordinated multiple sections and exclusive-open behavior.
  • You expect finished visuals, spacing, icons, or motion without adding application styles.
  • Your narrow layout cannot accommodate content that may overflow unless you revise the demo sizing and content wrapping.

Install

Installation record for shadcn-collapsible
Declared dependenciesradix-ui
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

In a non-shadcn React project, install radix-ui, copy the wrapper module, and ensure the app supports client components and the source's TypeScript JSX syntax. Add your own trigger, content, focus, spacing, overflow, and optional motion styles.

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.