Checkbox

A small box that users can check or uncheck

PropTypeDescription
onChange() => voidonChane property
checked?booleanInitial checkbox value
children?React.NodeAccpets children to render
error?stringError message
language icon
copy icon
import { Checkbox } from "@brick-uikit/input";

Usage checkbox

Checkbox

Checkboxes allow users to select one or more options from a list. You can control their state using the `checked` property and handle changes with the `onChange` callback. The `error` property can display validation messages, and `children` allows you to render a label next to the checkbox.

You must accept terms to continue

language icon

example.tsx

copy icon
<Checkbox 
	onChange={handleChange} 
	checked
>
	Accept terms and conditions
</Checkbox>

<Spacer top={1}/>

<Checkbox
	onChange={handleChange}
	error="You must accept terms to continue"
>
	Accept terms and conditions
</Checkbox>