TidalUI

Alert dialog preview

Confirm an action with clear cancel and confirm controls.

pro · Feedback · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/alert-dialog

Import components/ui/tidal.css, components/ui/alert-dialog.css. Wrap installed components in tidal-scope.

Preview

Alert dialog component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/alert-dialog.css";
import{TidalAlertDialog}from"./components/ui/alert-dialog";
export default(p:Parameters<typeof TidalAlertDialog>[0])=><div className="tidal-scope"><TidalAlertDialog {...p}/></div>;

API and props

TidalAlertDialog.cancelLabel (required)
ReactNode

Required cancel label value accepted by this exported component.

TidalAlertDialog.confirmLabel (required)
ReactNode

Required confirm label value accepted by this exported component.

TidalAlertDialog.description (required)
ReactNode

Required description value accepted by this exported component.

TidalAlertDialog.onCancel (required)
(event: TidalAlertDialogCancelEvent, reason: TidalAlertDialogCancelReason) => void

Callback invoked when the cancel interaction is proposed.

TidalAlertDialog.onConfirm (required)
(event: ReactMouseEvent<HTMLButtonElement>) => void

Callback invoked when the confirm interaction is proposed.

TidalAlertDialog.onOpenChange (required)
(open: boolean) => void

Callback invoked when the open change interaction is proposed.

TidalAlertDialog.open (required)
boolean

Required open value accepted by this exported component.

TidalAlertDialog.title (required)
ReactNode

Required title value accepted by this exported component.

TidalAlertDialog.trigger (required)
ReactElement<unknown, string | JSXElementConstructor<any>>

Required trigger value accepted by this exported component.

TidalAlertDialog.actionsLabel
string | undefined

Optional actions label value accepted by this exported component.

TidalAlertDialog.busy
boolean | undefined

Optional busy value accepted by this exported component.

TidalAlertDialog.busyLabel
ReactNode

Optional busy label value accepted by this exported component.

TidalAlertDialog.cancelButtonProps
TidalAlertDialogButtonProps | undefined

Optional cancel button props value accepted by this exported component.

TidalAlertDialog.cancelButtonRef
Ref<HTMLButtonElement> | undefined

Optional cancel button ref value accepted by this exported component.

TidalAlertDialog.cancelDisabled
boolean | undefined

Optional cancel disabled value accepted by this exported component.

TidalAlertDialog.confirmButtonProps
TidalAlertDialogButtonProps | undefined

Optional confirm button props value accepted by this exported component.

TidalAlertDialog.confirmButtonRef
Ref<HTMLButtonElement> | undefined

Optional confirm button ref value accepted by this exported component.

TidalAlertDialog.confirmDisabled
boolean | undefined

Optional confirm disabled value accepted by this exported component.

TidalAlertDialog.contentProps
Omit<Omit<Dialog.DialogContentProps & RefAttributes<HTMLDivElement>, "ref">, "role" | "aria-describedby" | "aria-labelledby" | "children"> | undefined

Optional content props value accepted by this exported component.

TidalAlertDialog.detail
ReactNode

Optional detail value accepted by this exported component.

TidalAlertDialog.dir
"ltr" | "rtl" | undefined

Optional dir value accepted by this exported component.

TidalAlertDialog.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalAlertDialog.escapeCancels
boolean | undefined

Optional escape cancels value accepted by this exported component.

TidalAlertDialog.outsidePointerCancels
boolean | undefined

Optional outside pointer cancels value accepted by this exported component.

TidalAlertDialog.overlayProps
Omit<Omit<Dialog.DialogOverlayProps & RefAttributes<HTMLDivElement>, "ref">, "children"> | undefined

Optional overlay props value accepted by this exported component.

TidalAlertDialog.portalContainer
HTMLElement | null | undefined

Optional portal container value accepted by this exported component.

TidalAlertDialog.theme
"light" | "dark" | undefined

Optional theme value accepted by this exported component.

TidalAlertDialog.tone
"default" | "danger" | undefined

Optional tone value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas