Skip to content

Description

The Checkbox component is shown as a square box that is ticked (checked) when activated. Checkboxes are used to let a user select one or more options of a limited number of choices.

Demos

Unchecked Checkbox (default state)

<Checkbox label="Checkbox" on_change={(e) => console.log(e)} />

Checked Checkbox, left label position

<Checkbox
label="Label:"
label_position="left"
checked
on_change={({ checked }) => console.log(checked)}
/>

Checked Checkbox with error message

Error message
<Checkbox label="Checkbox" checked status="Error message" />

Checkbox with suffix

<Checkbox
label="Checkbox"
checked
suffix={<HelpButton title="Modal Title">Modal content</HelpButton>}
/>

With different sizes

As for now, there are two sizes. medium is the default size.

<Checkbox size="medium" label="Medium" right="large" checked />
<Checkbox size="large" label="Large" checked />

Disabled checkbox

<Checkbox checked disabled />