CheckBox

Examples

A check box in a web form. We have a separate component from the browser base so we can style it.

Properties

checked true|false
Same as React <input checked={} />.
defaultChecked true|false
Same as React <input defaultChecked={} />.
disabled true|false
Same as React <input disabled={} />. Also adds a hidden input element with the same name so form submissions work.
id {string}
The DOM id attribute value to use for the underlying <input/> element.
label {string|node}
Label text to place next to the control.
name {string}
The DOM name attribute value to use for the underlying <input/> element.
onChange {function}
Same as React <input onChange={} />.
reverse true|false
Whether to show the label in front of the checkbox. Defaults to false.
toggle true|false
Whether to visualize it as a toggle switch. Defaults to false.