Collapsible

Shadcn compatible collapsible on Base UI: a full width trigger that shows or hides a panel of content. Accessible expanded state and keyboard support.

src/registry/ui/collapsible.tsx/r/collapsible.json

Installation#

bash
npx shadcn@latest add @minidev/collapsible

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/collapsible.json

Usage#

tsx
import { Collapsible } from "@/components/ui/collapsible"

export function Example() {
  return <Collapsible />
}

API reference#

Also accepts every prop of CollapsibleRoot props, passed through to the root element.

Dependencies#

npm

@base-ui/react

Built from

No other MiniDev files
All layout components

Learn more