Docs Menu
Docs/Guides/Dialogs & Modals Overview
Updated October 2026

Dialogs & Modals Overview

Accessible modal dialogs with focus trapping, tone badges, button styling, and Escape key dismissal.

toastory includes a comprehensive modal dialog toolkit designed to replace legacy libraries like SweetAlert2 with modern Apple frosted glass aesthetics and full WCAG 2.2 AA accessibility.

Confirmation Dialog

typescript

const res = await ui.confirm({ title: 'Delete Production Database?', text: 'All cluster backups and records will be immediately erased.', tone: 'danger', confirmButton: { label: 'Destroy Database', color: '#dc2626' }, cancelButton: { label: 'Keep Safe' }, allowOutsideClick: false, });

if (res.isConfirmed) { toast.error('Database destroyed'); } `

Want to test these options live?

Launch the interactive playground to experiment with themes, positions, and live generators.

Open in Playground →