Label

An accessible label for form controls, built on Bits UI.

<script lang="ts">
  import { Label } from "$lib/components/ui/label";
  import { Input } from "$lib/components/ui/input";
</script>
 
<div class="flex max-w-xs flex-col gap-2">
  <Label for="email">Email</Label>
  <Input id="email" type="email" placeholder="you@example.com" />
</div>

Installation

npx lily-svelte@latest add 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>

Built by levish. The source code is available on GitHub.

Quiet by design.