- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
usePrompt
This hook can be used to prompt the user for confirmation of an action.
Usage#
API Reference#
Call Signature#
usePrompt()
usePrompt return#
Value | Type | Description |
---|---|---|
dialog | function | Async function used to display a new confirmation dialog. |
Was this page helpful?
UsePromptProps#
Prop | Type | Default |
---|---|---|
title | string | - |
description | string | - |
variant | "danger" | "confirmation" | "danger" |
verificationText | string | - |
verificationInstruction | string | "Please type {val} to confirm:" |
cancelText | string | "Cancel" |
confirmText | string | "Confirm" |
Was this page helpful?
Examples#
Basic#
Was this example helpful?
With Verification#
Was this example helpful?