• Docs
  • Blog
    • 0.24.0

    • Switch to dark mode
    Get Started
    Components
    Styling
    Theming

    Concepts

    OverviewCompositionTesting

    Layout

    Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrap

    Components

    AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

    Utilities

    Feature FlagsForLocal StoragePortalShowsplitPropsTheme

    Confirm Modal

    The Confirm Modal component provides a way to confirm actions with users, ensuring they are aware of the consequences before proceeding.

    • npm
    • source
    • recipe
    import { ConfirmModal, useConfirmModal } from '@cerberus/react'

    Usage

    Non-destructive

    Destructive

    No Avatar

    Customization

    For customizing the Confirm Modal, we recommend extending the confirmModal slot recipe provided by the @cerberus/panda-preset package in your config.

    API

    export type ShowConfirmModalOptions =
    | NonDestructiveConfirmModalOptions
    | DestructiveConfirmOptions
    export interface ConfirmModalProviderValue {
    show: (options: ShowConfirmModalOptions) => Promise<boolean>
    }
    define function ConfirmModal(props: PropsWithChildren<{}>): ReactNode

    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. For non-destructive modals only, can be a ReactNode.
    actionTextThe text for the action button.
    cancelTextThe text for the cancel button.

    On this page

    • Edit this page on Github
    Cerberus Design System | Docs