<dy-switch>

A switch component that allows users to toggle between two states. It provides visual feedback and can be customized with different colors based on semantic meanings.

Example

API

DuoyunSwitchElement

Extends TapSwitchElement

TapSwitchElement

Shadow DOM; Extends GemElement

TapSwitchElement Instance Properties

Property(Attribute) Reactive Type
disabled(disabled) Yes boolean
checked(checked) Yes boolean
value(value) Yes string
neutral(neutral) Yes 'positive' | 'negative' | 'neutral' | 'informative'
change Emitter<boolean>

TapSwitchElement Other

Type Value
Event change
Slot unnamed