Control | Disclosure
Disclosure#
Description#
- Accessible collapsible section (WAI-ARIA disclosure pattern): the header is a
<button>witharia-expandedandaria-controlsthat opens and closes a content region.
Props#
title(string) — Header title. Required.open(boolean) — Controlled: open/closed state. Without it, the component manages itself. Default:undefined.defaultOpen(boolean) — Initial state when uncontrolled. Default:false.variant('plain' | 'card') —plainis a loose row;cardwraps it in a card with border and surface. Default:'plain'.disabled(boolean) — Disables interaction. Default:false.
Emits#
update:open(boolean) — Emitted with the new state on toggle.toggle(boolean) — Emitted with the new state on toggle.
Usage#
| |
Notes#
openisundefinedby default on purpose: an unpassedbooleanprop arrives asfalseand would break uncontrolled mode.- The
metaslot goes to the right of the header (counters, badges). - The
titleslot allows customizing the header content.