6.8k

A two-state button that can be either on or off.

Docs API Reference

Installation

pnpm dlx shadcn-svelte@latest add toggle

Usage

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

Examples

Default

Outline

With Text

Small

Large

Disabled