Switch

The form switch element is an important component that is required to get the activation value or on/off value from the user:

<script>
    import { Switch } from 'svelte-spectre'

    let value = false
</script>

<Switch bind:value inline validity={null}>Switch</Switch>
© 2022 — 2023 BASF SE

API Switch

value: boolean = false
Checkbox value
true | false
inline: boolean = false
Checkbox inline
true | false
validity: Validity = null
Checkbox validity
null | success | error