@hua-labs/ui
v1.1.0
bash
npm install @hua-labs/huatsx
import { Label } from "@hua-labs/hua";default
required
error
disabled
required | boolean | false | Shows required indicator (*) |
error | boolean | false | Error state styling |
disabled | boolean | false | Disabled state styling |
variant | "default" | "glass" | "default" | Visual style variant |
htmlFor | string | - | 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