Label

Atom

Standalone form label with an optional required indicator and disabled state, for pairing with custom controls that do not manage their own label.

Basic + required

Preview
Code
<Label htmlFor="name">Full name</Label>
<Label htmlFor="email" required>Email address</Label>

Paired with a custom control

Preview
Code
<Label htmlFor="bio">Bio</Label>
<textarea id="bio" rows={2} />

<Label disabled htmlFor="handle">Handle (disabled)</Label>
<input id="handle" disabled placeholder="@handle" />
Sourcemodules/ui/Label.tsx