Docs
Prompt

Prompt

A dialog that prompts the user for input.

Installation

Usage

import { Prompt } from "@/components/ui/prompt";
<Prompt open={isOpen}>
  <Prompt.Content>
    <Prompt.Header>
      <Prompt.Title>Delete Account</Prompt.Title>
      <Prompt.Description>
        This action cannot be undone. This will permanently delete your account.
      </Prompt.Description>
    </Prompt.Header>
    <Prompt.Footer>
      <Prompt.Cancel onClick={() => setIsOpen(false)}>Cancel</Prompt.Cancel>
      <Prompt.Action onClick={() => handleDelete()}>Delete</Prompt.Action>
    </Prompt.Footer>
  </Prompt.Content>
</Prompt>

Props

Root

PropTypeDefaultDescription
openboolean-Controls the visibility of the prompt dialog.
childrenReactNode-The content to display in the dialog.

These are layout components that help structure the dialog content.

Title, Description

Used to display the main text content in the dialog.

Action, Cancel

Button components for confirming or canceling the prompt action.