Skip to main content
PROYECTOVIVIANA

AlertDialog

The props declared for AlertDialog, generated from the types @proyecto-viviana/ui ships.

Import

import { AlertDialog } from "@proyecto-viviana/ui";

Props

Props for AlertDialog in @proyecto-viviana/ui
PropTypeDefaultDescription
title*string—The title of the alert dialog.
children*JSX.Element—The content/message of the alert dialog.
triggernumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—The trigger element that opens the dialog.
variant'warning' | 'error' | 'confirmation' | 'information' | 'destructive''confirmation'The variant of the alert dialog.
primaryActionLabelstring—Label for the primary action button.
secondaryActionLabelstring—Label for the secondary action button.
cancelLabelstring—Label for the cancel button.
onPrimaryAction() => void—Handler called when the primary action is triggered.
onSecondaryAction() => void—Handler called when the secondary action is triggered.
onCancel() => void—Handler called when canceled.
isPrimaryActionDisabledfalse | true—Whether the primary action button is disabled.
isSecondaryActionDisabledfalse | true—Whether the secondary action button is disabled.
autoFocusButton'primary' | 'secondary' | 'cancel'—Which action button should receive initial focus.
size'S' | 'M' | 'L'—The size of the alert dialog.
isOpenfalse | true—Whether the dialog is open.
defaultOpenfalse | true—Whether the dialog is open by default.
onOpenChange(isOpen: boolean) => void—Handler called when open state changes.
isDismissiblefalse | true—Whether the dialog is dismissible. Alert dialogs default to false.
isDismissablefalse | true—Alias for isDismissible, retained for older Solid Spectrum examples.
classstring—Additional CSS class name.

Declared in packages/viviana-ui/src/dialog/AlertDialog.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.