Alert Dialog
A modal layer that only an explicit action dismisses: no backdrop click, no close button. It declares only what differs from dialog.
npx shadcn@latest add @fragiola/alert-dialogOne file
Installing alert-dialog after dialog writes exactly one file — this one. The layer family and the createLayerParts factory are already on disk. AlertDialog reuses Dialog's Backdrop, Popup, Title, Description, Close and Portal at runtime; the factory injects the namespace so each component inherits its own divergence if Base UI ever splits them.
What differs
Only three things: the primitive namespace, the absence of a close button (showClose={false}), and the action/cancel pair (which is just Clickable.Button composed in the footer, not a new part). A destructive confirmation is className="palette-danger" on the action button — no variant="destructive", no tone prop.
Parts
| Part | Source |
|---|---|
Root / Trigger / Portal | Base UI AlertDialog |
Backdrop / Content / Header / Body / Footer / Title / Description / Close | layer via createLayerParts |
Dialog
A modal layer: a centred panel over a scrim. It shares the `layer` family with alert-dialog and drawer, declaring only Root, Trigger, Portal and centring.
Drawer
An edge-anchored layer with real swipe and snap-point support, built on Base UI's `Drawer` primitive, which is why there is no `sheet`.