Checkbox
Components
Checkbox()
Checkbox(
props
,context
?):ReactNode
A Checkbox component allows users to select one or more options from a list. Checkboxes are most useful when you have multiple options to present. When there is only one option available, consider using a toggle instead.
Parameters
Parameter | Type |
---|---|
props | CheckboxProps |
context ? | any |
Returns
ReactNode
Example
<Checkbbox
id='nsfw'
label="NSFW"
name="nsfw"
value="nsfw"
handleChange={onSelectCheckbox}
isSelected={false}
/>
Source
libs/design-system-core/src/components/Checkbox/index.tsx:71
Props
CheckboxProps
CheckboxProps:
object
Type declaration
Member | Type |
---|---|
customStyle | string |
error | boolean |
handleChange | () => void |
id | string |
indeterminate | boolean |
isDisabled | boolean |
isSelected | boolean |
label | string |
labelColor | Color |
labelDirection | "left" | "right" |
name | string |
size | CheckboxSize |
value | string |
Source
libs/design-system-core/src/components/Checkbox/index.tsx:14
CheckboxSize
CheckboxSize:
"small"
|"large"
Source
libs/design-system-core/src/components/Checkbox/index.tsx:12