Skip to content

materialr/switch

Repository files navigation

MaterialR Switch

@materialr/switch

Build Status Coverage Status NSP Status semantic-release

React Material switch implementation

Installation

$ npm install --save @materialr/switch

Demo

A full demo is available on the MaterialR website showcasing all variants.

Components

Default export

import Switch from '@materialr/switch';

Props

Prop Type Required Default Description
checked bool No false Whether the switch is on
className string No undefined Additional classNames to add
disabled bool No false Whether the switch is disabled
id string No uuidv1() The id attribute of the element
label string Yes N/A The label to render for the switch
name string No undefined The 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

About

React Material switch implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published