s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Feedback and overlays

ConfirmDialog

ConfirmDialog - Modal confirmation dialog refactored for Material 3 Provides a consistent confirmation dialog for destructive actions or important decisions. Native showModal() puts confirmations above existing Modal/Drawer surfaces, traps focus and makes the background inert. Escape is handled locally so only the active confirmation requests cancellation.

Public export

typescript
import { ConfirmDialog } from '@happyvertical/smrt-ui/feedback';
Import path
@happyvertical/smrt-ui/feedback
Props
9
Props described
9 of 9
Bindable state
0
Callback events
2
Verified release
0.57.40

Props

NameTypeRequiredDescription
openbooleanYesWhether the dialog is open
titlestringYesDialog title
messagestring | SnippetYesPlain text or rich message snippet
confirmLabelstringNoConfirm button label
cancelLabelstringNoCancel button label
destructivebooleanNoUse destructive (red) styling for confirm
loadingbooleanNoShow loading state on confirm
onconfirm() => voidNoCalled when confirm is clicked
oncancel() => voidNoCalled when cancel is clicked or dialog closed

Bindable state

This component has no bindable public state.

Callback events

  • onconfirm() => void
  • oncancel() => void

Examples and explanation