Toggle
A two-state button that can be on or off.
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 toggle source from the registry into $lib/components/ui/toggle.
Usage
<script lang="ts">
import { Toggle } from '$lib/components/ui/toggle';
let pressed = $state(false);
</script>
<Toggle bind:pressed>Bold</Toggle>