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 { Drawer, Button } from "@/rl-ui";
<Drawer
placement="right"
size={420}
title="Details"
trigger={<Button variant="secondary">Open drawer</Button>}
content={<p>Detail body</p>}
/>Examples#
Placements#
import { Drawer, Button } from "@/rl-ui";
<>
<Drawer placement="right" title="Right" trigger={<Button>Right</Button>} content="Body" />
<Drawer placement="left" title="Left" trigger={<Button>Left</Button>} content="Body" />
<Drawer placement="bottom" title="Bottom" trigger={<Button>Bottom</Button>} content="Body" />
</>API#
| Prop | Type | Default | Description |
|---|---|---|---|
placement | "left" | "right" | "top" | "bottom" | "bottom" | Edge the drawer enters from. |
size | number | 400 | Panel size in px (horizontal drawers). |
open | boolean | — | Controlled open state. |
title | ReactNode | — | Header title. |
description | ReactNode | — | Header description. |
content | ReactNode | — | Body content. |
footer | ReactNode | — | Footer actions. |
trigger | ReactNode | — | Element that opens the drawer. |
closable | boolean | true | Show close control. |
overlayClosable | boolean | true | Click outside to close. |