Skip to content
Hazine

Alert dialogs

1 of 4 shipped. Each take is a different structure, and the note under its title says how.

  • alert dialogs

    The body is a framed list of counted effects in a lost group and a quieter kept band, and the confirm button stays gated behind one acknowledgement checkbox that it points to when pressed early.

    shadcn add @hazine/alert-dialog-consequence-list

    Depends on alert-dialog, button, checkbox, label, @hazine/use-controllable-state, lucide-react

Planned 3

  • Alert dialog with safe default focus

    Baseline two-action layout where the least destructive action receives initial focus and Enter can never trigger the destructive path by default.

  • Session timeout alert dialog

    Time-driven rather than user-triggered: the dialog opens by itself, the countdown is announced at coarse intervals (each minute, then at 30 and 10 seconds) instead of every tick, extending needs one key press (WCAG 2.2.1), and focus returns to wherever the user was working.

  • Discard changes alert dialog

    Three-way choice with a non-destructive primary and a save shortcut, where the footer stacks vertically on mobile in order of safety.