Skip to main content

dyte-switch

A switch component which follows Dyte's Design System.

<dyte-switch id="dyte-el"></dyte-switch>

<script>
const el = document.getElementById('dyte-el');
el.addEventListener('dyteChange', (e) => {
alert('New switch value:', e.detail);
});
</script>

Props

checked

Whether the switch is enabled/checked

Default
false
Type
boolean

disabled

Whether switch is readonly

Default
false
Type
boolean

iconPack

Icon pack

Default
defaultIconPack

readonly

Whether switch is readonly

Default
false
Type
boolean

t

Language

Default
useLanguage()