Sections
Components
- AlertBanner
- AlertDialog
- Alert
- Avatar
- Badge
- Breadcrumb
- Button
- CalendarIcon
- CellLayout
- CellLink
- Checkbox
- Collapse
- ContentSwitcher
- ControlLabel
- DatePicker
- Dialog
- Divider
- Drawer
- EmptyCell
- EmptyState
- Empty
- ErrorOverlay
- FilterBar
- FilterChips
- Flex
- GridLayout
- HumanisedDate
- Icon
- InputDuration
- InputField
- Input
- Label
- Loader
- MoreActions
- NumberInput
- OutsideClickHandler
- PageLoader
- Page
- Popconfirm
- Popover
- ProgressPie
- Progress
- RadioButtonGroup
- RadioGroup
- Radio
- RelativeTime
- Resizable
- SearchInput
- Select
- SkeletonText
- Skeleton
- Space
- SquadAvatarList
- StatusPicker
- Stepper
- Switch
- TableLight
- Tabs
- Tag
- Text
- Textarea
- Toast
- Tooltip
- TriggerSelect
- Upload
import { Dialog, Button } from "@/rl-ui";
<Dialog
title="New item"
description="Fill in the basics."
trigger={<Button variant="primary">Open</Button>}
content={<p>Form fields go here.</p>}
hideFooter
/>Examples#
Variants#
import { Dialog, Button } from "@/rl-ui";
<>
<Dialog variant="basic" title="Basic" trigger={<Button>Basic</Button>} content="Body" />
<Dialog variant="success" title="Success" trigger={<Button variant="success">Success</Button>} content="Body" />
<Dialog variant="danger" title="Danger" trigger={<Button variant="danger">Danger</Button>} content="Body" />
</>Default footer#
import { Dialog, Button } from "@/rl-ui";
<Dialog
title="Confirm"
description="Apply these changes?"
trigger={<Button variant="primary">Open</Button>}
content="Review the summary before continuing."
/>API#
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "basic" | "success" | "danger" | "basic" | Header / action tone. |
width | number | 512 | Dialog width in px. |
open | boolean | — | Controlled open state. |
defaultOpen | boolean | — | Uncontrolled initial open. |
onOpenChange | (open: boolean) => void | — | Open change handler. |
title | ReactNode | — | Dialog title. |
description | ReactNode | — | Supporting copy. |
content | ReactNode | — | Body content. |
trigger | ReactNode | — | Element that opens the dialog. |
hideFooter | boolean | false | Omit default Cancel / Ok footer. |
closable | boolean | true | Show close (X) control. |
actionProps | ButtonProps & { text? } | — | Primary action button props. |
cancelProps | ButtonProps & { text? } | — | Cancel button props. |