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
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
| Name | Default | Description |
|---|---|---|
size"default" | "sm" | "default" | |
showCloseButtonboolean | true | |
closeLabelstring | 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
| Name | Default | Description |
|---|---|---|
showCloseButtonboolean | false | |
closeLabelstring | 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.
Related
Weigh Dialog against these before you choose.