bit Bheadless

Disclosure

A single show/hide region toggled by a button — the simplest collapsible primitive.

Implementation: CSS Tailwind

Basic Disclosure

Renders a button and a panel. Clicking the button toggles the panel. aria-expanded, aria-controls, and aria-labelledby are wired automatically.

Default Open

Set DefaultOpen="true" to render the panel open initially (uncontrolled).

I'm open by default. Click the button to close me.

Render Context (rotating chevron + Close)

BitBhDisclosure, BitBhDisclosureButton, and BitBhDisclosurePanel all expose a BitBhDisclosureRenderContext via Context="d". Use it to drive UI from the open state and to call d.Close() from anywhere inside.

Disabled

Set Disabled="true" on the root to block interaction. The button receives both the native disabled attribute and a data-disabled hook.

Controlled

Drive the open state externally with Open + OnOpenChange. The button below opens or closes the disclosure programmatically.

Open: false
An unhandled error has occurred. Reload 🗙