Components · Form & Input
Label
StableSince v0.0.1
An accessible form label that optionally shows a required asterisk and links to an input via htmlFor.
import { Label } from '@nexub/react';Examples
Default
Required
With input
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | — | Associates the label with a form control by its id. |
| required | boolean | — | Renders a required indicator (asterisk) after the label text. |
| disabled | boolean | — | Applies disabled styling to the label. |
| size | 'sm' | 'md' | 'md' | Controls label font size. |
On iOS & Android
Web only
Label has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.