All components

Collapsible

Collapsible is a React and Tailwind CSS layout component from shadcn/ui, licensed MIT. Copy it and paste it into your project.

shadcn/ui MIT layout

What it is

Collapsible is a React and Tailwind CSS layout component from shadcn/ui, licensed MIT. Copy it and paste it into your project.

How to use it

Open it in the catalogue, press copy, and paste it into your project. The prompt you copy carries the code and the rules that tell your agent to reproduce it without changing anything.

Open in the catalogue

Five free copies a month. No card.

Needs

npm i @radix-ui/react-collapsible

Licence

This component comes from shadcn/ui and is redistributed under the MIT licence, which permits commercial use. The copyright notice travels with the code.

Collapsible

ui/collapsible.tsx
"use client"

import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"

const Collapsible = CollapsiblePrimitive.Root

const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger

const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent

export { Collapsible, CollapsibleTrigger, CollapsibleContent }

Similar components