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 { StatusPicker } from "@/rl-ui";
<StatusPicker
options={[
{ value: "todo", label: "To do", color: "gray" },
{ value: "done", label: "Done", color: "green" },
]}
value={status}
onChange={setStatus}
/>Examples#
Sizes#
import { StatusPicker } from "@/rl-ui";
<>
<StatusPicker size="small" options={options} value="todo" onChange={setS} />
<StatusPicker size="medium" options={options} value="done" onChange={setS} />
</>Icon only#
import { StatusPicker } from "@/rl-ui";
<StatusPicker iconOnly options={options} value="progress" onChange={setS} />API#
| Prop | Type | Default | Description |
|---|---|---|---|
options | StatusOption[] | — | Status options (required). |
value | string | — | Selected value. |
onChange | (value: string) => void | — | Change handler. |
size | "small" | "medium" | "medium" | Trigger size. |
iconOnly | boolean | false | Hide the label. |
placeholder | string | "Select status" | Empty placeholder. |
disabled | boolean | false | Disable the picker. |
header | ReactNode | — | Dropdown header. |