6.7k

A control that allows the user to toggle between checked and not checked.

Docs API Reference Component Source

Installation

pnpm dlx shadcn-svelte@next add switch

Usage

<script lang="ts">
  import { Switch } from "$lib/components/ui/switch/index.js";
</script>
 
<Switch />

Examples

Form