Documentation
Checkbox

Checkbox

A native browser checkbox input with label to toggle between two states. Similar to Switch input, internal checked and unchecked states can be set to any value, not just boolean true or false.

Has Universal Input API, with input value format, parse, normalize and event action handlers.

Props

PropTypeDefaultDescription
label
String

Text to use for checkbox, uses id if not given

id
String

Unique identifier, default is string created from React.useId()

onChange
Function

Input onChange callback(event, value: any, name?: string, self: object)

value
Any

Internal value for controlled checked or unchecked state

defaultValue
Any

Initial value for uncontrolled checked or unchecked state

checkedValue
Any
true

Internal value to assign to checked case

uncheckedValue
Any
false

Internal value to assign to unchecked case

readonly
Boolean

Whether to disable toggling state

Examples

Basic Usage

Example
Via Universal Input
Checkbox Label

Checkbox Sizes

Example

Input States

Disabled
Read only
Loading

Input Values

Checked Initially
Controlled State
Hybrid State (uncontrolled, but updates on `value` changes)

For more native input type examples, see Universal Checkbox Input.