Materialish

Checkbox

A Checkbox represents a boolean value that can be in one of two states, true or false.

🙌 Heads up! This code is editable. The preview above will update to reflect your changes.

Usage

import { Checkbox } from 'materialish';
import 'materialish/materialish.css';

Props

Prop NameDefault ValueDescription
classNameAdditional class name(s) to add to the Checkbox
styleInline styles to add to the root element of the Checkbox
nodeRefPass a ref to get access to the input element
...restOther props are placed on the underlying input element

CSS Variables

VariableDefault ValueDescription
--mt-baseFontSize1remThe size of the checkbox is based off of this value
--mt-checkbox-backgroundColor--mt-mainColor, #2196f3The background color of the checkbox
--mt-checkbox-tickColor#ffffffThe color of the checkbox's tick
--mt-checkbox-focusColor#e8e8e8The color of the focused circle layer

Useful Links