Skip to content

bash
npm install @hua-labs/hua
tsx
import { Label } from "@hua-labs/hua";

default
required
error
disabled

requiredbooleanfalseShows required indicator (*)
errorbooleanfalseError state styling
disabledbooleanfalseDisabled state styling
variant"default" | "glass""default"Visual style variant
htmlForstring-ID of the associated form element

docs:common.basicUsage
import { Label, Input } from '@hua-labs/hua';

<Label htmlFor="email">Email</Label>
<Input id="email" type="email" />
Required
<Label required htmlFor="name">Name</Label>
<Input id="name" required />
Error State
<Label error htmlFor="password">Password</Label>
<Input id="password" type="password" aria-invalid />

  • htmlFor: Connects label to form element for accessibility
  • aria-required: Indicates required field to screen readers
  • Required Indicator: Visual asterisk indicates required fields