Label
The Label component provides accessible text labels for form controls.
Basic Usage
import { Label } from "@paramanu/forms-react"
export default function App() { return <Label htmlFor="email">Email address</Label>}<label class="pm-label pm-label--md">Email address</label>Accessibility
| Feature | Detail |
|---|---|
<label> | Semantic label element |
htmlFor | Associates label with input |
aria-required | Indicates required fields |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | "xs" | "sm" | "md" | "lg" | "md" | Label size |
disabled | boolean | false | Disabled state |
required | boolean | false | Shows required indicator |
htmlFor | string | — | Associated input ID |