Semantics
A real label targets one form control.
Forms and selection · stable · MIT
A native label with required, optional, disabled, and read-only cues.
Install editable source
Behavior contract
A real label targets one form control.
Click moves focus through native label behavior.
Light and dark themes, logical RTL layout, reduced motion, responsive content, and forwarded public refs.
Source-derived reference
These public React parts are read directly from the canonical source during the documentation build.
GummyLabelGummyLabelPropsComposes React.LabelHTMLAttributes<HTMLLabelElement> & { required?: boolean; optional?: boolean; disabled?: boolean; readOnly?: boolean; meta?: React.ReactNode; }
Troubleshooting
Implementation decisions
Use a label to give a form control a persistent, programmatic name that remains visible while someone enters or reviews a value. Keep requirement and status text adjacent without duplicating the accessible name, and connect supplementary guidance through a description. Clicking the text should focus or toggle the intended control. Test repeated fields, dynamically generated identifiers, error summaries, long translations, nested groups, high zoom, and assistive-technology output before composing custom layouts.
Live product source
The Component Lab exercises real source across default, focus, disabled, responsive, dark, reduced-motion, and RTL contexts.
Open the live Component LabInteractive inspection
Load the real component preview when you are ready to interact with its responsive, theme, and direction controls.
Editable source
The registry payload stays off the initial page request.