Skip to Content
ComponentsOverlayAlert Dialog

Alert Dialog

A modal overlay component that requires an explicit user action or confirmation before closing. 

Sizes

Use the alert-dialog-content-{size} class to control the component size.

Size values can include:smmdlgxl.

For more information on all available sizing utilities, visit Tailwind 

Customizing

globals.css
:root { --ex-alert-dialog-z-index: 50; --ex-alert-dialog-overlay-z-index: 45; --ex-alert-dialog-font-size-sm: var(--text-sm); --ex-alert-dialog-font-size-md: var(--text-sm); --ex-alert-dialog-font-size-lg: var(--text-sm); --ex-alert-dialog-font-size-xl: var(--text-sm); --ex-alert-dialog-radius-sm: var(--radius-sm); --ex-alert-dialog-radius-md: var(--radius-sm); --ex-alert-dialog-radius-lg: var(--radius-sm); --ex-alert-dialog-radius-xl: var(--radius-sm); --ex-alert-dialog-shadow-sm: var(--shadow-xl); --ex-alert-dialog-shadow-md: var(--shadow-xl); --ex-alert-dialog-shadow-lg: var(--shadow-xl); --ex-alert-dialog-shadow-xl: var(--shadow-xl); --ex-alert-dialog-w-sm: var(--container-sm); --ex-alert-dialog-w-md: var(--container-md); --ex-alert-dialog-w-lg: var(--container-lg); --ex-alert-dialog-w-xl: var(--container-xl); --ex-alert-dialog-section-gap-x-sm: calc(var(--spacing) * 2.5); --ex-alert-dialog-section-gap-x-md: calc(var(--spacing) * 2.5); --ex-alert-dialog-section-gap-x-lg: calc(var(--spacing) * 2.5); --ex-alert-dialog-section-gap-y-sm: calc(var(--spacing) * 2); --ex-alert-dialog-section-gap-y-md: calc(var(--spacing) * 2); --ex-alert-dialog-section-gap-y-lg: calc(var(--spacing) * 2); --ex-alert-dialog-section-px-sm: calc(var(--spacing) * 5); --ex-alert-dialog-section-px-md: calc(var(--spacing) * 5); --ex-alert-dialog-section-px-lg: calc(var(--spacing) * 5); --ex-alert-dialog-section-px-xl: calc(var(--spacing) * 5); --ex-alert-dialog-section-py-sm: calc(var(--spacing) * 5); --ex-alert-dialog-section-py-md: calc(var(--spacing) * 5); --ex-alert-dialog-section-py-lg: calc(var(--spacing) * 5); --ex-alert-dialog-section-py-xl: calc(var(--spacing) * 5); --ex-alert-dialog-title-font-size-sm: var(--text-base); --ex-alert-dialog-title-font-size-md: var(--text-base); --ex-alert-dialog-title-font-size-lg: var(--text-base); --ex-alert-dialog-title-font-size-xl: var(--text-base); --ex-alert-dialog-title-font-weight: var(--font-weight-semibold); --ex-alert-dialog-description-font-size-sm: var(--text-sm); --ex-alert-dialog-description-font-size-md: var(--text-sm); --ex-alert-dialog-description-font-size-lg: var(--text-sm); --ex-alert-dialog-description-font-size-xl: var(--text-sm); --ex-alert-dialog-description-font-weight: var(--font-weight-normal); --ex-alert-dialog-description-opacity: var(--ex-options-opacity-muted); }

API

Alert Dialog

PropTypeDefault
asElementTypediv
asChildbooleanfalse

Alert Dialog Trigger

ElementSelector
AlertDialog.Trigger.ex-alert-dialog-trigger
PropTypeDefault
asElementTypediv
asChildbooleanfalse

Alert Dialog Content

ElementSelector
AlertDialog.Content.ex-alert-dialog-content
PropTypeDefault
asElementTypediv
asChildbooleanfalse

Alert Dialog Section

ElementSelector
AlertDialog.Section.ex-alert-dialog-section
PropTypeDefault
asElementTypediv
asChildbooleanfalse

Alert Dialog Overlay

ElementSelector
AlertDialog.Overlay.ex-alert-dialog-overlay
PropTypeDefault
asElementTypediv
asChildbooleanfalse

Alert Dialog Title

ElementSelector
AlertDialog.Title.ex-alert-dialog-title
PropTypeDefault
asElementTypeh4
asChildbooleanfalse

Alert Dialog Description

ElementSelector
AlertDialog.Description.ex-alert-dialog-description
PropTypeDefault
asElementTypep
asChildbooleanfalse

Alert Dialog Action

ElementSelector
AlertDialog.Action.ex-alert-dialog-action
PropTypeDefault
asElementTypediv
asChildbooleanfalse

Alert Dialog Cancel

ElementSelector
AlertDialog.Cancel.ex-alert-dialog-cancel
PropTypeDefault
asElementTypediv
asChildbooleanfalse
Last updated on