UI Components
Collapsible
A single-item expandable panel with animated height transition โ perfect for FAQs, descriptions, and settings.
Quick Preview
A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.
Installation
// Copy Collapsible.tsx to your components/ui/ folder// src/components/ui/Collapsible.tsx
Usage
import { Collapsible } from '@/components/ui/Collapsible'// Basic usage<Collapsible trigger="Click to expand">Hidden content shown when expanded</Collapsible>// Open by default<Collapsible trigger="Initially open" defaultOpen>This content is visible by default</Collapsible>
Examples
FAQ Style
We charge monthly or annually. You can cancel at any time.
Yes! Every plan supports unlimited team members.
We accept Visa, Mastercard, and all major payment methods.
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger* | React.ReactNode | - | Content shown in the header/toggle area |
children* | React.ReactNode | - | Content revealed when expanded |
defaultOpen | boolean | false | Whether the panel starts open |
open | boolean | - | Controlled open state |
onOpenChange | (open: boolean) => void | - | Called when open state changes |