UI / Components / foundations / Label

Label

Form-input pairing. Required-asterisk + error states.

Standard form label. `required` adds a red asterisk; `error` shifts the text + asterisk to the error color. Pair with `htmlFor` to wire to its control.

$npx dock-ui add label

Usage

import { Label } from "@/components/ui/label";

<Label htmlFor="email" required>Email</Label>
<Input id="email" />

Install

via CLI
$ npx dock-ui add label
Writes the file(s) directly to your components/ui/ folder. You own the code.
For agents
curl -L https://ui.trydock.ai/r/label.json
Returns a JSON manifest with file paths + contents. Agent-readable, LLM-fetchable.
← All components
Themes·Component kit · glossary
View on GitHub →