Switch
Switches provide a simple visual toggler.
Examples
import React from 'react';
import ReactDOM from 'react-dom';
import { Switch } from 'furl-components';
ReactDOM.render(
<Switch color='primary'>Turn lights on/off</Switch>,
document.getElementById('root')
);
API
Property | Description | Type | Default | ||
---|---|---|---|---|---|
color | switch color | string | 'plain' | ||
disabled | switch disabled state | boolean | false | ||
checked | switch checked state | boolean | |||
name | switch name | string | |||
onChange | switch onchange event> | function |
Notes
color
can be any of the predefined color palettes ('plain'
,'primary'
,'secondary'
,'success'
,'warning'
or'danger'
).