Components

A modal window for displaying additional content or actions.

Installation

npm install @mijn-ui/react-dialog

Usage

import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@mijn-ui/react-dialog"
<Dialog>
  <DialogTrigger>Open</DialogTrigger>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Are you absolutely sure?</DialogTitle>
      <DialogDescription>
        This action cannot be undone. This will permanently delete your account
        and remove your data from our servers.
      </DialogDescription>
    </DialogHeader>
  </DialogContent>
</Dialog>

API Reference

Built on Radix UI — all underlying primitive props are forwarded in addition to the props below.

PropTypeDefaultDescription
unstyledbooleanfalseOpt out of the default styles to fully customize the component.
classNamesobjectOverride classes per slot (see Style Slots below).
classNamestringAdditional classes for the root element.

Dialog Style Slots

Slot NameTargeted ComponentPurpose
baseDialogStyles the root dialog component.
triggerDialogTriggerStyles the trigger for opening the dialog.
overlayDialogOverlayStyles the background overlay of the dialog.
contentDialogContentStyles the dialog content area.
contentWrapperDialogContentStyles the wrapper around dialog content.
headerDialogHeaderStyles the dialog header.
footerDialogFooterStyles the dialog footer.
titleDialogTitleStyles the title of the dialog.
descriptionDialogDescriptionStyles the description text of the dialog.
closeDialogCloseStyles the close button of the dialog.