Prompt Dialog
A customizable dialog for user input with validation.
Installation
Full Setup guideInstall the component automatically via Shadcn CLI.
npx shadcn@latest add https://www.grettech.com/api/registry/prompt-dialogProps
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Optional CSS classes to apply. |
title | string | Enter Value | The dialog title. |
description | string | Please provide the requested information below. | The dialog description. |
placeholder | string | Enter value... | Input placeholder text. |
submitText | string | Submit | Text for the submit button. |
onConfirm | (value: string) => void | Promise<void> | () => {} | Callback fired when user submits |
children | ReactNode | <Button variant='outline'>Open Prompt</Button> | The trigger button/element |
...props | React.HTMLAttributes<HTMLDivElement> | - | Accepts all standard HTML attributes (id, style, etc). |