6.8k

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

Docs API Reference

Installation

pnpm dlx shadcn-svelte@latest add switch

Usage

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

Examples

Form