2.4.3 • Published 5 months ago

@saekitominaga/customelements-input-switch v2.4.3

Weekly downloads
16
License
MIT
Repository
github
Last release
5 months ago

<input type="checkbox" role="switch"> by custom elements

npm version test status

Demo

Examples

<label><x-input-switch
  name="foo"
  value="1"
  checked=""
  disabled=""
  storage-key="foo"
></x-input-switch> switch</label>

Attributes

Style customization (CSS custom properties)

namedeaultDescription
--switch-width3.6emOuter frame width
--switch-height1.8emOuter frame height
--switch-padding0.2emSpacing between the outer frame and the sphere (Negative value can be specified)
--switch-bgcolor-on#2299ffBackground color when `on`
--switch-bgcolor-off#ccccccBackground color when `off`
--switch-bgcolor-disabled-on#666666disabled Background color when `on`
--switch-bgcolor-disabled-off#666666disabled Background color when `off`
--switch-ball-color#ffffffSlider sphere color (background property)
--switch-animation-duration0.5sTime a transition animation (transition-duration property)
--switch-outline-mouse-focusnoneFocus indicator on mouse-focus (outline property)
2.4.3

5 months ago

2.4.2

5 months ago

2.4.1

1 year ago

2.4.0

1 year ago

2.3.2

2 years ago

2.3.1

2 years ago

2.3.3

2 years ago

2.3.0

3 years ago

2.2.1

3 years ago

2.2.2

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago