Foundation ComponentReact 18 & 19Zero Runtime CSS
Label
A small connection that makes forms easier for everyone.
Interactive preview
Usage
import { Label, Input } from "@devvy-ui/react";
<Label htmlFor="project">Project name</Label>
<Input id="project" />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | — | ID of the associated form control. |
| children | ReactNode | — | Visible label content. |
Accessibility & behavior
Platform Behavior & Guidelines
Use htmlFor with a unique ID, or wrap a single control. Clicking the label activates its native control.
Source ownership
Add the audited implementation directly into your repository with the CLI:
node /path/to/devvy-ui/packages/cli/src/cli.mjs add labelMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Label.tsxREACT / TSX
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.