Dialog

Focuses attention on a task or decision in a modal surface. Use it when the user must review or complete something before returning to the page.

React

Ready

Figma

React examples

Default

import {
  Button,
  Dialog,
  DialogClose,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@kela-systems/ui-components";

export default function DialogDefault() {
  return (
    <Dialog>
      <DialogTrigger render={<Button variant="outline" />}>Export clip</DialogTrigger>
      <DialogContent closeLabel="Close">
        <DialogHeader>
          <DialogTitle>Export clip</DialogTitle>
          <DialogDescription>
            Camera 4, north gate, from 14:02 to 14:05. The file is saved to the mission archive.
          </DialogDescription>
        </DialogHeader>
        <DialogFooter>
          <DialogClose render={<Button variant="outline" />}>Cancel</DialogClose>
          <DialogClose render={<Button />}>Export</DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  );
}

Props

Dialog

No props of its own. It also takes the props of Base UI's dialog.

DialogClose

No props of its own. It also takes the props of Base UI's dialog.

DialogContent

NameDefaultDescription
size
"default" | "sm"
"default"
showCloseButton
boolean
true
closeLabel
string
Close

It also takes the props of Base UI's dialog.

DialogDescription

No props of its own. It also takes the props of Base UI's dialog.

DialogFooter

NameDefaultDescription
showCloseButton
boolean
false
closeLabel
string
Close

It also takes the attributes of the HTML element it renders.

DialogHeader

No props of its own. It also takes the attributes of the HTML element it renders.

DialogOverlay

No props of its own. It also takes the props of Base UI's dialog.

DialogPortal

No props of its own. It also takes the props of Base UI's dialog.

DialogTitle

No props of its own. It also takes the props of Base UI's dialog.

DialogTrigger

No props of its own. It also takes the props of Base UI's dialog.

Weigh Dialog against these before you choose.

Read this page as Markdown

Search ARK

Find a page, a primitive or a component.