@infinitoui/infinito-switch
v1.5.0
Published
switch
Downloads
1
Readme
Preview
Demo
Install
npm install @infinitoui/infinito-switch
Usage
引入组件:
import '@infinitoui/infinito-switch'
使用:
<infinito-switch></infinito-switch>
<infinito-switch checked></infinito-switch>
<infinito-switch disabled></infinito-switch>
Properties
| Property | Attribute | Type | Default | Description |
|------------|------------|-----------|---------|-------------|
| checked
| checked
| boolean
| false | 默认是否选中 |
| disabled
| disabled
| boolean
| false | 是否禁用 |
Events
| Event | Description |
|----------|-------------|
| change
| 状态改变事件 |
CSS Custom Properties
| Property | Default | Description |
|------------------|---------|------------------|
| --switch-color
| "#333" | 主体颜色,未选中状态透明度 .2 |