Skip to content

Custom Dialog

Dialog with title, content and action slots wired for forms.

Installation

bun add @xerobi/ui
import { ConfirmDialog } from "@xerobi/ui/custom-dialog"

This component is client-side. In Astro, hydrate it with a client directive.

API reference

ConfirmDialog

PropTypeDescription
open*boolean
onClose*() => void
title*string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>
action*string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>Primary action, usually a `<Button color="error">`. Rendered before Cancel.
contentstring | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>
cancelLabelstring | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>

Search documentation

Search pages, components and blocks.