Installation
Usage
- React
- Vue
In Vue templates, boolean props require
: binding — :open="true"API Reference
Root
The root container for the collapsible component.| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | false | Start open |
Trigger
The button that toggles the collapsible panel. No props.Panel
The collapsible content region. No props.Keyboard Navigation
| Key | Action |
|---|---|
| Enter or Space | Toggle panel visibility |
No arrow key navigation — follows the WAI-ARIA disclosure pattern.
Accessibility
- Uses
aria-expandedto indicate panel state - Uses
aria-controlsto link trigger to panel - Uses
aria-labelledbyto associate panel with trigger - Uses
hidden="until-found"to preserve browser find-in-page (Ctrl+F / Cmd+F) - Triggers
beforematchevent to auto-open when find-in-page reveals hidden content
Monochrome is headless — no CSS shipped. You provide all styles.
Collapsible vs Accordion
Use Collapsible for a single independent disclosure widget. Use Accordion when you have multiple related panels with keyboard navigation between them.Browser Requirements
Requires Baseline 2024 features:hidden="until-found"— preserves Ctrl+F / Cmd+F for hidden contentbeforematchevent — auto-opens components when find-in-page reveals hidden content