Collapsible
Unstyled disclosure container with built-in Apple 27 height easing and Reduced Motion support, ideal for sidebar folders and expandable detail panels.
Fully compatible with the standard shadcn/ui JSX API (Collapsible / CollapsibleTrigger / CollapsibleContent). The trigger stays unstyled for flexible composition, while CollapsibleContent provides smooth height and opacity transitions using Apple 27's cubic-bezier(.32,.72,0,1) curve (instant when Reduced Motion is enabled).
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/collapsibleUsage
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/collapsible';
export function Example() {
return (
<Collapsible>
<CollapsibleTrigger>Show Details</CollapsibleTrigger>
<CollapsibleContent>Model: MacBook Pro (M5)</CollapsibleContent>
</Collapsible>
);
}Props API
| Prop | Type | Default | Description |
|---|---|---|---|
open / defaultOpen | boolean | — | Controlled / uncontrolled open state |
onOpenChange | (open: boolean) => void | — | Callback fired when open state changes |
disabled | boolean | false | Disable the disclosure trigger |
CodeBlock
Default Liquid Glass code viewer with SF Mono typography, sticky line numbers, diff highlighting, Xcode-themed syntax highlighting, and one-click copy.
Color Picker
Hex color field with an Apple 27 color well — a swatch button opens a Liquid Glass panel (spectrum, hue track and system color swatches) on desktop and an iOS 27 bottom Drawer on mobile.