Switch
A toggle control for switching between on and off states.
Installation
Installs the style saved in lily.json. For a new Diamond project,
run lily-svelte init --style diamond first.
Install the lily base and `utils` (run once per project).
npx lily-svelte@latest init Copy the switch source from the registry into $lib/components/ui/switch.
Usage
<script lang="ts">
import { Switch } from '$lib/components/ui/switch';
let enabled = $state(false);
</script>
<Switch bind:checked={enabled} />