---
components: ["Toggle", "ToggleSkeleton"]
---

<script>
  import { Toggle, ToggleSkeleton } from "carbon-components-svelte";
  import Preview from "../../components/Preview.svelte";
</script>

### Default (untoggled)

<Toggle labelText="Push notifications" />

### Toggled

<Toggle labelText="Push notifications" toggled />

### Reactive example

<FileSource src="/framed/Toggle/ToggleReactive" />

### on:toggle event

<Toggle labelText="Push notifications" on:toggle={e => console.log(e.detail)} />

### Custom labels

<Toggle labelText="Push notifications" labelA="No" labelB="Yes" />

### Disabled

<Toggle labelText="Push notifications" disabled />

### Small size

<Toggle size="sm" labelText="Push notifications" />

### Skeleton

<ToggleSkeleton />

### Skeleton (small)

<ToggleSkeleton size="sm" />