Skip to main content

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

ParameterType
propsCheckboxProps
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

MemberType
customStylestring
errorboolean
handleChange() => void
idstring
indeterminateboolean
isDisabledboolean
isSelectedboolean
labelstring
labelColorColor
labelDirection"left" | "right"
namestring
sizeCheckboxSize
valuestring

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