Label

Accessible label for form controls.

Installation

npx @noarka/cli add label

Usage

tsx
import { Input, Label } from "@noarka/ui";
tsx
<div className="max-w-sm space-y-1.5">  <Label htmlFor="demo-username">Username</Label>  <Input id="demo-username" placeholder="johndoe" /></div>

Examples

Required mark

Flag required fields with an asterisk.

Disabled group

Labels dim automatically inside a disabled group or next to a disabled peer.

With helper text

Add a hint line under the field.

Visible on your public profile.

API reference

Label

PropTypeDefault
htmlFor

Id of the control it labels. Clicking the label focuses the control.

string-
children

Label text. Mark required fields with an asterisk span.

ReactNode-
className

Additional classes merged with the default label styles.

string-