Collapse
Expandable panels for toggling visibility of grouped content.
When to Use
- For FAQ sections or help pages
- To hide secondary content behind expandable headers
- For accordion-style navigation
Import
Examples
Basic
Accordion
Only one panel open at a time.
Bordered & Ghost
API
CollapseProps
items—CollapseItem[]— Panel configuration arrayactiveKey—string | string[]— Currently open panel keys (controlled)defaultActiveKey—string | string[]— Initially open panelsaccordion—boolean— Only one panel open at a time (default:false)bordered—boolean— Show borders (default:true)ghost—boolean— Transparent background (default:false)expandIconPosition—"start" | "end"— Icon position (default:"start")size—"large" | "middle" | "small"— Panel sizecollapsible—"header" | "icon" | "disabled"— Collapsible trigger areaexpandIcon—(panelProps) => ReactNode— Custom expand icondestroyInactivePanel—boolean— Unmount hidden panels (default:false)onChange—(key: string | string[]) => void— Open state callback
CollapseItem
key—string— Unique panel identifierlabel—ReactNode— Panel header textchildren—ReactNode— Panel contentextra—ReactNode— Extra element in headershowArrow—boolean— Show expand arrow (default:true)forceRender—boolean— Force render even when collapsed