Alert Dialog

Displays a confirmation modal window above the page contents.

AlertDialog.Content

align

centerstart

asChild

boolean

Composes the component into its immediate child instead of rendering its own HTML element. You’ll have to provide a single React Element child.

container

Element | DocumentFragment | null

height

Responsive<string>

maxHeight

Responsive<string>

maxWidth

Responsive<string>

Sets the CSS **max-width** property. Supports CSS strings and responsive objects.

minHeight

Responsive<string>

minWidth

Responsive<string>

Sets the CSS **min-width** property. Supports CSS strings and responsive objects.

size

12

width

Responsive<string>

Sets the CSS **width** property. Supports CSS strings and responsive objects.

AlertDialog.Title

align

centerleftright

as

h1h2h3h4h5h6

color

rubygraygoldbronzebrownyellowamberorangetomatoredcrimsonpinkplumpurplevioletirisindigobluecyantealjadegreengrasslimemintsky

highContrast

boolean

size

123456789

trim

endnormalbothstart

truncate

boolean

weight

boldmediumlightregular

wrap

wrapnowrapprettybalance

Also supports MarginProps: `m`, `mb`, `ml`, `mr`, `mt`, `mx`, `my`

AlertDialog.Description

align

centerleftright

color

rubygraygoldbronzebrownyellowamberorangetomatoredcrimsonpinkplumpurplevioletirisindigobluecyantealjadegreengrasslimemintsky

highContrast

boolean

size

123456789

trim

endnormalbothstart

truncate

boolean

weight

boldmediumlightregular

wrap

wrapnowrapprettybalance

Also supports MarginProps: `m`, `mb`, `ml`, `mr`, `mt`, `mx`, `my`

AlertDialog.Header

title

required
ReactNode

description

ReactNode

error

ReactNode

Use the size prop in the Content component to control the maxWidth of the alert dialog. If you have a very specific case, you can still pass a custom maxWidth prop to override the size.

Use the Inset component to create a container that ignores the Content part padding. If needed, you can recreate the original padding by setting the Inset part’s padding props to "current".

A complete example showing how to create an alert dialog for destructive actions with proper loading states and network request simulation.

A complete example showing how to create a confirmation dialog for destructive actions that require text confirmation, using React Hook Form and loading states.

A complete example showing how to handle server-side errors in alert dialogs with proper error display.

Dashboard

7 variants found

AlertDialog in Delete Application Dialogdashboard

/:environmentId/applications/:applicationId

AlertDialog in Delete Log Stream Dialogdashboard

/:environmentId/log-streams/:logStreamId

size 2 alertdialog in Enable Flag Dialogdashboard
size=2
size 5 alertdialog in Delete Application Dialogdashboard

/:environmentId/applications/:applicationId

size=5
size 5 alertdialog in Delete Log Stream Dialogdashboard

/:environmentId/log-streams/:logStreamId

size=5
size 1 alertdialog in Delete Secret Dialogdashboard

/:environmentId/applications/:applicationId

size=1
size 1 alertdialog in Generate Secret Dialogdashboard

/:environmentId/applications/:applicationId

size=1

Admin Portal

1 variant found

size 2 alertdialog in Delete Directory Buttonadmin-portal

/p/:portalSessionId/directory-sync/:directoryId/completed

size=2

Context

AlertDialog.Content
PropTypeDefaultRequired
align
"center" | "start"no
asChild
booleanno
container
Element | DocumentFragment | nullno
height
Responsive<string>no
maxHeight
Responsive<string>no
maxWidth
Responsive<string>no
minHeight
Responsive<string>no
minWidth
Responsive<string>no
size
"1" | "2"no
width
Responsive<string>no
AlertDialog.Title
PropTypeDefaultRequired
align
Responsive<"center" | "left" | "right">no
as
"h1" | "h2" | "h3" | "h4" | "h5" | "h6"no
color
"ruby" | "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | ... 8 more ...no
highContrast
booleanno
size
Responsive<"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">no
trim
Responsive<"end" | "normal" | "both" | "start">no
truncate
booleanno
weight
Responsive<"bold" | "medium" | "light" | "regular">no
wrap
Responsive<"wrap" | "nowrap" | "pretty" | "balance">no

Also supports MarginProps: m, mb, ml, mr, mt, mx, my

AlertDialog.Description
PropTypeDefaultRequired
align
Responsive<"center" | "left" | "right">no
color
"ruby" | "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | ... 8 more ...no
highContrast
booleanno
size
Responsive<"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">no
trim
Responsive<"end" | "normal" | "both" | "start">no
truncate
booleanno
weight
Responsive<"bold" | "medium" | "light" | "regular">no
wrap
Responsive<"wrap" | "nowrap" | "pretty" | "balance">no

Also supports MarginProps: m, mb, ml, mr, mt, mx, my

AlertDialog.Header
PropTypeDefaultRequired
title
ReactNodeyes
description
ReactNodeno
error
ReactNodeno

Usage

Used 297 times across 2 packages

Dashboard
267
Admin Portal
30

Variant Distribution

size

1
40%
2
54%
5
6%

Where it's used

48 files

/:environmentId/applications/:applicationId

packages/dashboard/src/app/(private)/(sidebar)/[environmentId]/applications/[applicationId]/delete-secret-dialog.tsx13
packages/dashboard/src/components/users/userland-invite-menu.tsx12
packages/dashboard/src/components/flags/slack-integration-dialog.tsx8
packages/dashboard/src/components/settings/team-settings/delete-team-dialog/delete-team-dialog.tsx8
packages/dashboard/src/components/emails/providers/remove-custom-email-provider-dialog.tsx7
packages/dashboard/src/components/organizations/organization/deactivate-organization-membership-dialog.tsx7
packages/dashboard/src/components/organizations/organization/reactivate-organization-membership-dialog.tsx7
packages/dashboard/src/components/settings/team-settings/reset-user-mfa-settings-modal/reset-user-mfa-settings-modal.tsx7
packages/dashboard/src/components/users/email-suppression-dialog.tsx7

/:environmentId/roles-and-permissions/resource-types/edit/content-panel

packages/dashboard/src/app/(private)/(chromeless)/[environmentId]/roles-and-permissions/resource-types/edit/content-panel/delete-resource-type-dialog.tsx8

Show 38 more files