bit Bheadless

Collapsible

An interactive component which expands and collapses a panel.

Implementation: CSS Tailwind

Basic Collapsible

aria-expanded, aria-controls, and aria-labelledby are wired automatically.

@peduarte starred 3 repositories
@radix-ui/primitives

Default Open

Set DefaultOpen="true" to render open initially.

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

Render Context (rotating chevron + Close)

The trigger and content expose a BitBhCollapsibleRenderContext. Use it to drive UI from the open state and call c.Close().

What's inside?

Disabled

data-disabled: dims the trigger.

Can't toggle me

Controlled

External Open + OnOpenChange.

Open: false
Internal trigger
An unhandled error has occurred. Reload 🗙