8.7k

Collapsible

A collapsible panel controlled by a button.

API Reference

Installation

pnpm dlx shadcn@latest add @coss/collapsible

Usage

import {
  Collapsible,
  CollapsiblePanel,
  CollapsibleTrigger,
} from "@/components/ui/collapsible"
<Collapsible>
  <CollapsibleTrigger>Can I access the file in the cloud?</CollapsibleTrigger>
  <CollapsiblePanel>
    Yes, you can access the file in the cloud.
  </CollapsiblePanel>
</Collapsible>

Comparing with Radix / shadcn

This section shows what to change when moving from shadcn/ui (Radix-based) to our Base UI–backed Collapsible. We cover only the most relevant differences.

Quick Checklist

  • Use CollapsiblePanel going forward; CollapsibleContent remains for legacy
  • If you used asChild on parts, switch to the render prop

coss.com ui

Built by and for the team of Cal.com, Inc. — the leading commercial open source company (“coss”).