lion/packages/switch/README.md
Thomas Allmer 89b835a799 feat: improved storybook demos
Co-authored-by: Joren Broekema <Joren.Broekema@ing.com>
Co-authored-by: Alex Ghiu <Alex.Ghiu@ing.com>
Co-authored-by: Thijs Louisse <Thijs.Louisse@ing.com>
2020-01-13 13:58:03 +01:00

27 lines
751 B
Markdown

# Switch
[//]: # 'AUTO INSERT HEADER PREPUBLISH'
`lion-switch` is a component that is used to toggle a property or feature on or off. Toggling the component on or off should have immediate action and should not require pressing any additional buttons (submit) to confirm what just happened. The Switch is not a Checkbox in disguise and should not be used as part of a form.
## Live Demo/Documentation
> See our [storybook](http://lion-web-components.netlify.com/?path=/docs/buttons-switch) for a live demo and documentation
## How to use
### Installation
```sh
npm i --save @lion/switch
```
```js
import '@lion/switch/lion-switch.js';
```
### Example
```html
<lion-switch name="airplaneMode" label="Airplane mode" checked></lion-switch>
```