<script lang="ts">
import { Label } from "$lib/components/ui/label/index.js";
import { Switch } from "$lib/components/ui/switch/index.js";
</script>
<div class="flex items-center space-x-2">
<Switch id="airplane-mode" />
<Label for="airplane-mode">Airplane Mode</Label>
</div> Installation
pnpm dlx jsrepo@latest add switchnpx jsrepo@latest add switchyarn dlx jsrepo@latest add switchbunx jsrepo@latest add switchInstall bits-ui:
pnpm add bits-ui -Dnpm install bits-ui -Dyarn add bits-ui -Dbun add bits-ui -DCopy and paste the following code into your project.
import Root from './switch.svelte';
export {
Root,
//
Root as Switch
};
Usage
<script lang="ts">
import { Switch } from '$lib/components/ui/switch/index.js';
</script> <Switch />