Switch

A toggle for settings that apply immediately.

Installation

Copy the command below and run it in your terminal.

bunx @sivir/ui add switch

Usage

Import Switch and bind its state:

import { Switch } from '$lib/sivir/components/switch';

<Switch bind:switched={enabled} label="Notifications" />

Examples

Switch in different states and compositions.

Basic

With description

Disabled