lion/packages/switch/README.md

29 lines
578 B
Markdown

# Switch
[//]: # 'AUTO INSERT HEADER PREPUBLISH'
`lion-input-switch` is a component that is used to toggle a property or feature on or off.
## Features
- Get or set the checked state (boolean) - `choiceChecked()`
- Get or set the value of the choice - `choiceValue()`
- Pre-select an option by setting the `checked` boolean attribute
## How to use
### Installation
```sh
npm i --save @lion/switch
```
```js
import '@lion/swith/lion-input-switch.js';
```
### Example
```html
<lion-input-switch name="airplaneMode" label="Airplane mode" checked></lion-input-switch>
```