Checkbox
Allow users to make selections and toggle options effortlessly with Rothko UI's Checkbox component. Present a list of choices and enable multiple selection, ensuring a clear and intuitive user interface for forms, settings, and more.
Usage
import { Checkbox } from '@rothko-ui/ui';
- Example
- Code
Label
Disabled
- Example
- Code
Disabled
Disabled + Checked
With Kind
- Example
- Code
Primary
Secondary
Success
Warning
Danger
Info
Props
Name | Type | Default | Description |
---|---|---|---|
Name checked | Type boolean | Default | Description Specifies whether the checkbox is checked. |
Name className | Type string | Default | Description The CSS class name for the checkbox. |
Name disabled | Type boolean | Default | Description Specifies whether the checkbox is disabled. |
Name error | Type boolean | Default | Description Specifies whether there is an error with the checkbox. |
Name errorText | Type string | Default Invalid | Description The error text to be displayed when there is an error. |
Name id | Type string | Default | Description Unique identifier for the checkbox. |
Name kind | Type RothkoKind | Default | Description The visual style of the checkbox. |
Name onChange | Type (v: boolean) => void | Default | Description The callback function called when the checkbox value changes. |
Name required | Type boolean | Default | Description Specifies whether the checkbox is required. |
Name style | Type React.CSSProperties | Default | Description The inline style for the checkbox. |