ConfirmProvider
ConfirmProvider(
__namedParameters):Element
Defined in: packages/ui/src/components/confirm-provider.tsx:32
Provides the useConfirm context and renders the confirmation dialog.
Wrap your application (or a subtree) with ConfirmProvider to enable the
imperative useConfirm() hook. The dialog is rendered using the UI plugin’s
confirmDialog slot, so it matches your chosen component library.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”children
Section titled “children”ReactNode
Returns
Section titled “Returns”Element
Example
Section titled “Example”// In your root layout:<ConfirmProvider> <App /></ConfirmProvider>
// In any descendant component:const confirm = useConfirm();const ok = await confirm({ title: "Delete?", variant: "danger" });