Label

Renders an accessible label associated with controls.

Loading preview…

Installation

Usage

Use label to associate text with form controls via matching for / id.

1<script lang="ts">
2	import { Label } from '~/components/label';
3	import { Input } from '~/components/input';
4</script>
5
6<div class="grid gap-2">
7	<Label for="email">Email</Label>
8	<Input id="email" type="email" placeholder="you@example.com" />
9</div>