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
| Prop | Type | Default | |
|---|---|---|---|
onClick | () => void | ||
disabled | boolean | false | |
size | number | 28 | Box 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. |
ariaLabel | string | close string |
Replaces
ModalCloseButton.tsx in both apps.