Label
An accessible label for form controls, built on Bits UI.
Installation
Installs the style saved in lily.json. For a new Diamond project,
run lily-svelte init --style diamond first.
Install the lily base and `utils` (run once per project).
npx lily-svelte@latest init Copy the label source from the registry into $lib/components/ui/label.
Usage
<script lang="ts">
import { Label } from '$lib/components/ui/label';
import { Input } from '$lib/components/ui/input';
</script>
<div class="flex flex-col gap-2">
<Label for="name">Name</Label>
<Input id="name" placeholder="example" />
</div>