DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

OverviewCompositionCerberus ContextTesting

Layout

Aspect RatioBleedBoxCenterContainerContainer QueryDividerFlexFloatGridGroupLink OverlayScrollableStackWrap

Components

AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTA ModalDate PickerDialogFieldFieldsetFile UploaderIconButtonInputLoading StatesMarqueeMenuNotificationsNumber InputPaginationPin InputPopoverProgress IndicatorsPrompt ModalRadioRatingSelectSliderSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

Utilities

Client OnlyDownload TriggerEnvironmentFeature FlagsFocus TrapForFormat ByteFormat NumberFormat Relative TimeFormat Relative TimeFrameHighlightJSON Tree ViewLocalePortalPresenceShowSwapsplitPropsTheme

Prompt Modal

The Prompt Modal is used to prompt the user for input, such as a passkey or confirmation for destructive actions.

  • npm
  • source
  • recipe
  • Ark
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Import

import { PromptModal, usePromptModal } from '@cerberus/react'

Usage

Note

PromptModal is considered a dialog template. This means it's a pre-configured layout that is not fully customizable by nature. If you want to fully customize the modal, use the Dialog instead.

Non-destructive

To prompt a user with a non-destructive template theme is the defeault setting.

Loading example...

Destructive

To use a destructive theme, add a kind option set to destructive. This will utilize the Danger Palette.

Loading example...

Primitives

The PromptModal is an abstraction of the Dialog Primitives and does not provide any additional customization. To build your own PromptModal, use the Dialog components.

API

PromptModal

The PromptModal component is an abstraction of the Dialog and accepts the same props as the Dialog component.

Show Method Options

The show method accepts the following options:

NameDefaultDescription
kindnon-destructiveThe variant used to theme the modal.
headingThe heading of the modal.
descriptionThe description of the modal.
keyA string key to test the user input against.
actionTextThe text for the action button.
cancelTextThe text for the cancel button.

On this page

  • Import
  • Usage
    • Non-destructive
    • Destructive
  • Primitives
  • API
    • PromptModal
    • Show Method Options
Edit this page on Github