Accordion
Accessible React accordion on Base UI, with bordered items, a rotating chevron and animated panels. Keyboard navigable, with one or many items open at once.
src/registry/ui/accordion.tsx/r/accordion.json
Installation#
bash
npx shadcn@latest add @minidev/accordion
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/accordion.json
Usage#
tsx
import { Accordion } from "@/components/ui/accordion"
export function Example() {
return (
<Accordion className="max-w-lg">
<AccordionItem value="a">
<AccordionTrigger>What is MiniDev UI?</AccordionTrigger>
<AccordionPanel>A Hairline shadcn registry for MiniDev products.</AccordionPanel>
</AccordionItem>
<AccordionItem value="b">
<AccordionTrigger>Does it use Geist?</AccordionTrigger>
<AccordionPanel>Yes — Geist Sans and Mono, self-hosted.</AccordionPanel>
</AccordionItem>
</Accordion>
)
}
API reference#
Also accepts every prop of AccordionPrimitive.Root props, passed through to the root element.
Dependencies#
npm
@base-ui/reactlucide-react
Built from
No other MiniDev files
Examples#
Related layout components#
App ShellTailwind app shell layout with a fixed width sidebar slot, a topbar slot and a scrolling main area. The sidebar hides below the md breakpoint for mobile.Aspect RatioShadcn compatible aspect ratio wrapper that locks media to a ratio such as 16:9 or 1:1 using CSS aspect-ratio, with overflow clipped for images and video.CardShadcn compatible card with header, title, description, action, content and footer slots, a compact size and edge to edge images. Built for Tailwind v4.CenterLayout helper that centers content horizontally and vertically in a narrow, text-centered column. Handy for empty states, auth screens and simple heroes.ClusterFlex layout primitive that wraps children in a row with vertical centering and a numeric gap on the 4px scale. Great for tags, buttons and meta rows.CollapsibleShadcn compatible collapsible on Base UI: a full width trigger that shows or hides a panel of content. Accessible expanded state and keyboard support.
All layout components