@materialr/checkbox
Material checkbox implementation for React
$ npm install --save @materialr/checkbox
A full demo is available on the MaterialR website showcasing all variants.
import Checkbox from '@materialr/checkbox';
Props
Prop | Type | Required | Default | Description |
---|---|---|---|---|
checked |
bool | No | undefined | Whether the checkbox is checked |
className |
string | No | undefined | Additional classNames to add |
disabled |
bool | No | false | Whether the checkbox is disabled |
id |
string | No | uuidv1() |
The id to add to the label and checkbox |
label |
string | Yes | N/A | The label for the checkbox |
name |
string | No | undefined | The checkbox element's name attribute |
onBlur |
func | No | undefined | The blur event handler |
onChange |
func | No | undefined | The change event handler |
onDragStart |
func | No | undefined | The dragstart event handler |
onDrop |
func | No | undefined | The drop event handler |
onFocus |
func | No | undefined | The focus event handler |