Skip to content

AlertDialogTrigger

Open .md
Live preview

Loading example…

Element that opens the dialog; asChild merges onto your own button.

import { AlertDialogTrigger } from "@jcsoftdev/ui/overlays";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/overlays/alert-dialog.

<AlertDialogTrigger
trigger={<Button variant="danger">Delete appointment</Button>}
title="Delete this appointment?"
description="Marco Salazar will be notified and the slot becomes free."
confirmLabel="Delete"
tone="danger"
/>
Prop Type Default Description
asChild boolean

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/overlays/alert-dialog/alert-dialog.tsx