# Shadcn Collapsible Components

An interactive component which expands/collapses a panel. Every example works interchangeably with Radix UI and Base UI primitives.

- Page: https://shadcnuikit.com/components/collapsible
- Variants: 8 (8 free, 0 pro)
- Built with shadcn/ui, Tailwind CSS v4, React and Next.js

- [Variant 1](https://shadcnuikit.com/components/collapsible/1) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible1`)
- [File tree](https://shadcnuikit.com/components/collapsible/2) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible2`)
- [With card](https://shadcnuikit.com/components/collapsible/3) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible3`)
- [With form](https://shadcnuikit.com/components/collapsible/4) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible4`)
- [Variant 5](https://shadcnuikit.com/components/collapsible/5) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible5`)
- [With dropdown menu](https://shadcnuikit.com/components/collapsible/6) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible6`)
- [Accordion](https://shadcnuikit.com/components/collapsible/7) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible7`)
- [Code](https://shadcnuikit.com/components/collapsible/8) (Free, install: `npx shadcn@latest add @shadcnuikit/collapsible8`)

## Install with the shadcn CLI

Add the registry to components.json once:

```json
"registries": {
  "@shadcnuikit": {
    "url": "https://shadcnuikit.com/r/{name}.json",
    "headers": {
      "Authorization": "Bearer ${REGISTRY_TOKEN}"
    }
  }
}
```

Then install any item by its registry name, for example `npx shadcn@latest add @shadcnuikit/hero1`. Free items install without an API key. Pro items need a license and an API key from https://shadcnuikit.com/account/api-keys, set as REGISTRY_TOKEN in your .env file.

More from Shadcn UI Kit: [llms.txt](https://shadcnuikit.com/llms.txt)