Installation
pnpm dlx shadcn-svelte@latest add https://coss-sv.vercel.app/r/label.jsonUsage
<script lang="ts">
import { Label } from "$lib/components/ui/label/index.js";
</script>
<Label for="email">Email</Label>API Reference
This is a native Svelte label wrapper rather than a Shards UI part.
Label
A label component that can render as a different element.
| Prop | Type | Default | Description |
|---|---|---|---|
as | keyof HTMLElementTagNameMap | "label" | Renders a different element |
Examples
For accessible labelling and validation, prefer using Field.Label. See some related examples.