Skip to content

SwitchIcon ​

Icon toggle switch component for switching between two visual states represented by icons.

Basic Usage ​

vue

<TSwitchIcon :icon="IconHeart" :active-icon="IconHeart" />

Custom Icons ​

API ​

Props ​

PropTypeDefaultDescription
model-valuebooleanfalseToggle state
iconComponent—Default icon
active-iconComponent—Active state icon
colorstring—Default icon color
active-colorstring—Active icon color
sizenumber24Icon size

Emits ​

EventParametersDescription
update:model-valuevalue: booleanState changed