Animate UI

Disclosure

A simple, accessible foundation for building custom UIs that show and hide content, like togglable accordion panels.

Made by imskyleen
Edit on GitHub

Installation

Usage

<Disclosure>
  <DisclosureButton>Disclosure Button</DisclosureButton>
  <DisclosurePanel>
    <div>Disclosure Panel</div>
  </DisclosurePanel>
</Disclosure>

API Reference

Disclosure

Headless UI API Reference - Disclosure

DisclosureButton

Headless UI API Reference - DisclosureButton

DisclosurePanel

Headless UI API Reference - DisclosurePanel
PropTypeDefault
transition?
Transition
{ type: 'spring', stiffness: 150, damping: 22 }
keepRendered?
boolean
false
...props?
HTMLMotionProps<"div">
-

Credits

Built by Skyleen. The source code is available on GitHub.