Askr documentation
Generated API snapshot

@askrjs/ui/alert-dialog

Exports from the declarations published in @askrjs/ui. Signatures reflect the published artifact.

Exports

This entrypoint publishes 30 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

ALERT_DIALOG_A11Y_CONTRACTtype

ALERT_DIALOG_A11Y_CONTRACT: { readonly CONTENT_ROLE: "alertdialog"; readonly LABELLED_BY_ATTRIBUTE: "aria-labelledby"; readonly DESCRIBED_BY_ATTRIBUTE: "aria-describedby"; readonly ACTION_REQUIREMENTS: { readonly hasPrimaryAction: true; readonly hasCancelAction: true; }; }

Alert dialog accessibility contract.

AlertDialogtype

AlertDialog: (props: AlertDialogProps) => JSX.Element

Renders a part of `alert-dialog`.

AlertDialogA11yContracttype

AlertDialogA11yContract: typeof ALERT_DIALOG_A11Y_CONTRACT

Type of the Alert Dialog A11y Contract object.

AlertDialogActiontype

DialogClose: { (props: DialogCloseProps): JSX.Element; (props: DialogCloseAsChildProps): JSX.Element; }

Renders the `dialog-close` part of `dialog`. Supports polymorphic rendering via `asChild`.

AlertDialogActionAsChildPropstype

AlertDialogActionAsChildProps: DialogCloseAsChildProps

Props for the `asChild` (polymorphic) rendering of Alert Dialog Action.

asChild
asChild: true;
children
children: JSXElement;
disabled
disabled?: boolean | undefined;
onPress
onPress?: ((event: PressEvent) => void) | undefined;
ref
ref?: Ref<Element>;
type
type?: undefined;

AlertDialogActionPropstype

AlertDialogActionProps: DialogCloseProps

Props for Alert Dialog Action.

asChild
asChild?: false | undefined;
children
children?: unknown;
disabled
disabled?: boolean | undefined;
onPress
onPress?: ((event: PressEvent) => void) | undefined;
ref
ref?: Ref<HTMLButtonElement>;
type
type?: "button" | "submit" | "reset" | undefined;

AlertDialogCanceltype

DialogClose: { (props: DialogCloseProps): JSX.Element; (props: DialogCloseAsChildProps): JSX.Element; }

Renders the `dialog-close` part of `dialog`. Supports polymorphic rendering via `asChild`.

AlertDialogCancelAsChildPropstype

AlertDialogCancelAsChildProps: DialogCloseAsChildProps

Props for the `asChild` (polymorphic) rendering of Alert Dialog Cancel.

asChild
asChild: true;
children
children: JSXElement;
disabled
disabled?: boolean | undefined;
onPress
onPress?: ((event: PressEvent) => void) | undefined;
ref
ref?: Ref<Element>;
type
type?: undefined;

AlertDialogCancelPropstype

AlertDialogCancelProps: DialogCloseProps

Props for Alert Dialog Cancel.

asChild
asChild?: false | undefined;
children
children?: unknown;
disabled
disabled?: boolean | undefined;
onPress
onPress?: ((event: PressEvent) => void) | undefined;
ref
ref?: Ref<HTMLButtonElement>;
type
type?: "button" | "submit" | "reset" | undefined;

AlertDialogContenttype

AlertDialogContent: (props: AlertDialogContentProps | AlertDialogContentAsChildProps) => JSX.Element

Renders a part of `alert-dialog`. Supports polymorphic rendering via `asChild`.

AlertDialogContentAsChildPropstype

AlertDialogContentAsChildProps: DialogContentAsChildProps

Props for the `asChild` (polymorphic) rendering of Alert Dialog Content.

asChild
asChild: true;
children
children: JSXElement;
forceMount
forceMount?: boolean | undefined;
onDismiss
onDismiss?: (() => void) | undefined;
onEscapeKeyDown
onEscapeKeyDown?: ((event: KeyboardEvent) => void) | undefined;
onInteractOutside
onInteractOutside?: ((event: Event) => void) | undefined;
onPointerDownOutside
onPointerDownOutside?: ((event: PointerEvent) => void) | undefined;
ref
ref?: Ref<Element>;
role
role?: "alertdialog" | "dialog" | undefined;

AlertDialogContentOwnPropstype

AlertDialogContentOwnProps: DialogContentOwnProps

Own props for Alert Dialog Content, before merging with native element attributes.

forceMount
forceMount?: boolean | undefined;
onDismiss
onDismiss?: (() => void) | undefined;
onEscapeKeyDown
onEscapeKeyDown?: ((event: KeyboardEvent) => void) | undefined;
onInteractOutside
onInteractOutside?: ((event: Event) => void) | undefined;
onPointerDownOutside
onPointerDownOutside?: ((event: PointerEvent) => void) | undefined;
role
role?: "alertdialog" | "dialog" | undefined;

AlertDialogContentPropstype

AlertDialogContentProps: DialogContentProps

Props for Alert Dialog Content.

asChild
asChild?: false | undefined;
children
children?: unknown;
forceMount
forceMount?: boolean | undefined;
onDismiss
onDismiss?: (() => void) | undefined;
onEscapeKeyDown
onEscapeKeyDown?: ((event: KeyboardEvent) => void) | undefined;
onInteractOutside
onInteractOutside?: ((event: Event) => void) | undefined;
onPointerDownOutside
onPointerDownOutside?: ((event: PointerEvent) => void) | undefined;
ref
ref?: Ref<HTMLDivElement>;
role
role?: "alertdialog" | "dialog" | undefined;

AlertDialogDescriptiontype

DialogDescription: { (props: DialogDescriptionProps): JSX.Element; (props: DialogDescriptionAsChildProps): JSX.Element; }

Renders the `dialog-description` part of `dialog`. Supports polymorphic rendering via `asChild`.

AlertDialogDescriptionAsChildPropstype

AlertDialogDescriptionAsChildProps: DialogDescriptionAsChildProps

Props for the `asChild` (polymorphic) rendering of Alert Dialog Description.

asChild
asChild: true;
children
children: JSXElement;
ref
ref?: Ref<Element>;

AlertDialogDescriptionPropstype

AlertDialogDescriptionProps: DialogDescriptionProps

Props for Alert Dialog Description.

asChild
asChild?: false | undefined;
children
children?: unknown;
ref
ref?: Ref<HTMLParagraphElement>;

AlertDialogOverlaytype

DialogOverlay: { (props: DialogOverlayProps): JSX.Element | null; (props: DialogOverlayAsChildProps): JSX.Element | null; }

Renders the `dialog-overlay` part of `dialog`. With `@askrjs/themes/default`, the overlay is fully styled out of the box with the shared backdrop token, blur, stacking, and fade animation. Standard Dialog and AlertDialog usage requires no additional overlay CSS; customize the theme tokens instead of applying a competing background class. Supports polymorphic rendering via `asChild`.

AlertDialogOverlayAsChildPropstype

AlertDialogOverlayAsChildProps: DialogOverlayAsChildProps

Props for the `asChild` (polymorphic) rendering of Alert Dialog Overlay.

asChild
asChild: true;
children
children: JSXElement;
forceMount
forceMount?: boolean | undefined;
ref
ref?: Ref<Element>;

AlertDialogOverlayOwnPropstype

AlertDialogOverlayOwnProps: DialogOverlayOwnProps

Own props for Alert Dialog Overlay, before merging with native element attributes.

forceMount
forceMount?: boolean | undefined;

AlertDialogOverlayPropstype

AlertDialogOverlayProps: DialogOverlayProps

Props for Alert Dialog Overlay.

asChild
asChild?: false | undefined;
children
children?: unknown;
forceMount
forceMount?: boolean | undefined;
ref
ref?: Ref<HTMLDivElement>;

AlertDialogOwnPropstype

AlertDialogOwnProps: DialogProps

Own props for Alert Dialog, before merging with native element attributes.

children
children?: unknown;
defaultOpen
defaultOpen?: boolean | undefined;
id
id?: string | undefined;
modal
modal?: boolean | undefined;
onOpenChange
onOpenChange?: ((open: boolean) => void) | undefined;
open
open?: boolean | undefined;

AlertDialogPortaltype

DialogPortal: (props: DialogPortalProps) => JSX.Element | null

Renders a part of `dialog`.

AlertDialogPortalPropstype

AlertDialogPortalProps: DialogPortalProps

Props for Alert Dialog Portal.

children
children?: unknown;

AlertDialogPropstype

AlertDialogProps: DialogProps

Props for Alert Dialog.

children
children?: unknown;
defaultOpen
defaultOpen?: boolean | undefined;
id
id?: string | undefined;
modal
modal?: boolean | undefined;
onOpenChange
onOpenChange?: ((open: boolean) => void) | undefined;
open
open?: boolean | undefined;

AlertDialogTitletype

DialogTitle: { (props: DialogTitleProps): JSX.Element; (props: DialogTitleAsChildProps): JSX.Element; }

Renders the `dialog-title` part of `dialog`. Supports polymorphic rendering via `asChild`.

AlertDialogTitleAsChildPropstype

AlertDialogTitleAsChildProps: DialogTitleAsChildProps

Props for the `asChild` (polymorphic) rendering of Alert Dialog Title.

asChild
asChild: true;
children
children: JSXElement;
ref
ref?: Ref<Element>;

AlertDialogTitlePropstype

AlertDialogTitleProps: DialogTitleProps

Props for Alert Dialog Title.

asChild
asChild?: false | undefined;
children
children?: unknown;
ref
ref?: Ref<HTMLHeadingElement>;

AlertDialogTriggertype

AlertDialogTrigger: (props: AlertDialogTriggerProps | AlertDialogTriggerAsChildProps) => JSX.Element

Renders a part of `alert-dialog`. Supports polymorphic rendering via `asChild`.

AlertDialogTriggerAsChildPropstype

AlertDialogTriggerAsChildProps: DialogTriggerAsChildProps

Props for the `asChild` (polymorphic) rendering of Alert Dialog Trigger.

asChild
asChild: true;
children
children: JSXElement;
disabled
disabled?: boolean | undefined;
onPress
onPress?: ((event: PressEvent) => void) | undefined;
ref
ref?: Ref<Element>;
type
type?: undefined;

AlertDialogTriggerPropstype

AlertDialogTriggerProps: DialogTriggerProps

Props for Alert Dialog Trigger.

asChild
asChild?: false | undefined;
children
children?: unknown;
disabled
disabled?: boolean | undefined;
onPress
onPress?: ((event: PressEvent) => void) | undefined;
ref
ref?: Ref<HTMLButtonElement>;
type
type?: "button" | "submit" | "reset" | undefined;