Collapsible
Shows and hides a section. Disclosure is the styled version: a 36 px trigger row with a chevron, a 13 px title and an optional muted count, and its content indented 32 px under the title. Accordion is several of them working together. The content grows to its height as it opens.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { Disclosure, Accordion, AccordionItem, Collapsible, CollapsibleTrigger, CollapsibleContent } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Props
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use Disclosure for one section the reader opens on demand, like a matter's billing details, so it sits closed on a 36 px row until needed. |
| Do | Use Accordion for a stack of sections where one open at a time keeps the panel short. Set multiple when a lawyer needs to compare two. |
| Do | Put a short muted note in meta, like "4 fields", so the reader knows what is inside before opening it. |
| Do | Use bare Collapsible with CollapsibleTrigger and render only when the trigger is your own control, like a Show more link under a list. |
| Don't | Hide a required field inside a closed section. Its error would be out of sight when the form fails to save. |
Props
Collapsible and Disclosure take ui-sdk's Collapsible options: open, defaultOpen, onOpenChange, disabled and controller. CollapsibleTrigger takes render. Accordion takes ui-sdk's Accordion options: value, defaultValue, onValueChange, multiple, collapsible, disabled and keepMounted; AccordionItem takes value and disabled.
Disclosure
| Prop | Type | Default | Description |
|---|---|---|---|
| title * | ReactNode | — | The 13 px title on the 36 px trigger row. |
| meta | ReactNode | — | A short muted note on the right of the trigger, like "4 fields". |
| children | ReactNode | — | What opens, 32 px in, under the title. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Accordion
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | What it shows inside. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
AccordionItem
| Prop | Type | Default | Description |
|---|---|---|---|
| title * | ReactNode | — | The 13 px title on the 36 px header row. |
| meta | ReactNode | — | A short muted note on the right of the header, like "3 fields". |
| children | ReactNode | — | What opens, 32 px in, under the title. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Collapsible
No props of its own.
CollapsibleTrigger
No props of its own.
CollapsibleContent
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | What it shows inside. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Code
What the playground shows, ready to copy.
import { Disclosure } from "@leap-crm/design-system";
<Disclosure
title="Matter details"
meta="4 fields"
>
Matter type, responsible staff, practice area and billing.
</Disclosure>Your own trigger
Compose Collapsible, CollapsibleTrigger and CollapsibleContent when the trigger isn't a row, like a Show more button. Pass the control to render.
Jane Citizen is buying a house in Paddington with her partner.
Several together: Accordion
Accordion stacks disclosures on dividers and coordinates them: opening one closes the other, and the arrow keys move between headers. Each header is a heading, so screen reader users can jump between sections.
Accordion, several open
multiple lets several items stay open together.
Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| EnterSpace | Toggle the panel and keep focus on the trigger. |
| Tab | Moves from an open trigger into its panel, and skips a closed panel. |





