bit Bheadless

CloseButton

A utility button pre-wired to close the nearest enclosing Dialog, Popover, or Disclosure.

Implementation: CSS Tailwind

Inside a Dialog

Drop <BitBhCloseButton> anywhere inside a Dialog and it auto-wires the close action.

Inside a Popover

Use inside a popover panel to close it on click.

Inside a Disclosure

Same pattern in a Disclosure.

Here are some details you can collapse.

Polymorphic rendering (As)

Render as different HTML tags while keeping ARIA + keyboard semantics.

Disabled state

data-disabled: dims the button and skips the close action.

An unhandled error has occurred. Reload 🗙