Collapsible

An interactive component which expands/collapses a panel.

Features

  • Full keyboard navigation.
  • Can be controlled or uncontrolled.

Install the component from your command line.

Import the components and piece the parts together.

Create your styled collapsible component from the primitive parts.

Contains all the parts of a collapsible.

PropTypeDefaultRequired
asenumdiv
defaultOpenboolean
openboolean
onOpenChangefunction
disabledboolean

The button that toggles the collapsible.

PropTypeDefaultRequired
asenumbutton

The component that contains the collapsible content.

PropTypeDefaultRequired
asenumdiv
forceMountboolean

Adheres to the Disclosure WAI-ARIA design pattern.

KeyDescription
SpaceOpens/closes the collapsible.
EnterOpens/closes the collapsible.