alert dialog
a confirmation sheet for an action that needs a decision. the title names the action, the explanation names what goes, and cancel gives a clear way back.
bunx --bun shadcn@latest add @mk/alert-dialogexample
delete the synthetic run or cancel to keep it. focus opens on cancel, the action closes the sheet, and the result shows below the trigger.
or-412 has 3 logs. cancel keeps them.
or-412 has 3 logs. cancel keeps them.
open
the confirmation printed over its plain scrim. this specimen stays on the page without taking focus or locking scroll.
draws where a floating layer meets the page, under its soft lift
actions
the default action prints in the house ink on paper and as the outline on a dark sheet. an action that leaves the app takes key.
default
house ink on paper, the outline on a dark sheet
key
an action that leaves the app
default
house ink on paper, the outline on a dark sheet
key
an action that leaves the app
sizes
the default sheet stops at 440 px; small stops at 320 px. both keep the same media, title and right-aligned actions.
default
440 px maximum width
sm
320 px maximum width
default
440 px maximum width
sm
320 px maximum width
states
the action keeps the button states: key ink for destructive work on paper, the outline off paper, and the ring for keyboard focus.
rest
destructive action in key ink
hover
destructive action in key ink
focus
outside house ring
pressed
destructive action in key ink
disabled
disabled action
rest
destructive action in key ink
hover
destructive action in key ink
focus
outside house ring
pressed
destructive action in key ink
disabled
disabled action