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 { ControlLabel, Switch } from "@/rl-ui";
<ControlLabel label="Email digests" control={<Switch defaultChecked />} />Examples#
Label placement#
import { ControlLabel, Switch } from "@/rl-ui";
<>
<ControlLabel label="Label end" labelPlacement="end" control={<Switch defaultChecked />} />
<ControlLabel label="Label start" labelPlacement="start" control={<Switch defaultChecked />} />
</>With description#
import { ControlLabel, Checkbox } from "@/rl-ui";
<ControlLabel
label="Weekly summary"
description="Sent every Monday morning."
control={<Checkbox defaultChecked />}
/>API#
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | — | Label text (required). |
control | ReactElement | — | Control element (required). |
labelPlacement | "end" | "start" | "end" | Label relative to control. |
verticalAlignment | "top" | "middle" | "top" | Cross-axis alignment. |
description | ReactNode | — | Secondary description. |
disabled | boolean | false | Dimmed / non-interactive presentation. |