nalarx-ui
Components

Modal close button

The close X for dialogs, sheets and panels.

bunx shadcn@latest add @nalarx/modal-close-button
<ModalCloseButton onClick={onClose} />

Ghost, outlined, 24px, 36px outlined, disabled:

Props

PropTypeDefault
onClick() => void
disabledbooleanfalse
sizenumber28Box in px; the X is about 57% of it. Grows to 36px on phones.
variant"ghost" | "outlined""ghost"outlined when the header background matches the dialog's.
ariaLabelstringclose string

Replaces

ModalCloseButton.tsx in both apps.

On this page