Epicenter
Local-first, open source apps
Installation
Install bits-ui:
Copy and paste the following code into your project.
Usage
<script lang="ts">
import { Switch } from "$lib/components/ui/switch/index.js";
</script> <Switch /> Local-first, open source apps
<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> pnpm dlx shadcn-svelte@latest add switchnpx shadcn-svelte@latest add switchnpx shadcn-svelte@latest add switchbun x shadcn-svelte@latest add switchInstall bits-ui:
pnpm i bits-ui -Dnpm i bits-ui -Dyarn install bits-ui -Dbun install bits-ui -DCopy and paste the following code into your project.
import Root from "./switch.svelte";
export {
Root,
//
Root as Switch,
};
<script lang="ts">
import { Switch } from "$lib/components/ui/switch/index.js";
</script> <Switch />