Label

A visible, clickable name for a native form control.

Interactive preview

Live specimenTry the component

Installation

Add editable source to an initialized React project. Set up antiflex/ui first if you are new here.

Terminal
npx antiflex-ui@0.1.0-alpha.2 add label

This site previews the latest workspace styles and motion. The published alpha keeps its released styles until the next npm release.

Usage

React
<Label htmlFor="workspace-name" required>Workspace name</Label>
<Input id="workspace-name" required />

API reference

All components forward native attributes, className, and refs to their underlying elements.

PropTypeDefault
htmlForstring—
requiredboolean (visual indicator)false

Accessibility

Connect htmlFor to the control id. The required marker is visual; set required on the control or its Field as well. Labels support native attributes and a label ref.