<script lang="ts">
import { Checkbox } from "$lib/components/ui/checkbox/index.js";
import { Label } from "$lib/components/ui/label/index.js";
</script>
<div>
<div class="flex items-center space-x-2">
<Checkbox id="terms" />
<Label for="terms">Accept terms and conditions</Label>
</div>
</div> Installation
pnpm dlx jsrepo@latest add labelnpx jsrepo@latest add labelyarn dlx jsrepo@latest add labelbunx jsrepo@latest add labelInstall 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 './label.svelte';
export {
Root,
//
Root as Label
};
Usage
<script lang="ts">
import { Label } from '$lib/components/ui/label/index.js';
</script> <Label for="email">Your email address</Label>