LibraryActive

Headless UI Disclosure

Unstyled, accessible React component for building show/hide UI like accordion panels.

Open source page ↗

Product features

Product features

Adding a description

Adding a label

Basic example

Combobox

Components

Data attributes

Exposes data-* attributes like data-open for state-based styling.

Disabling a combobox

Disabling a combobox option

DisclosureButton

Button that automatically opens/closes the panel when clicked.

DisclosurePanel

Panel component that shows or hides content.

Examples

Forms

Render props

Exposes open state via render props for conditional rendering.

Styling

Transitions

Add the transition prop to animate panel opening and closing.

Using data attributes

Using render props