Form
Label
Form field label with three sizes, a decorative required-field asterisk and a muted disabled style.
Import
import { Label } from "@zephora/react";Examples
Basic
Point `htmlFor` at the control id, like a native label.
<Label htmlFor="name-field">Full name</Label> <Input id="name-field" placeholder="Ada Lovelace" />
Required and disabled
<Label required>Email</Label> <Label disabled>Legacy setting</Label>
Sizes
<Label size="sm">Small</Label> <Label size="md">Medium</Label> <Label size="lg">Large</Label>
API
Label props
| Prop | Type | Default | Description |
|---|---|---|---|
size | "sm" | "md" | "lg" | "md" | Typography scale. |
required | boolean | false | Renders a required-field asterisk (decorative, aria-hidden). |
disabled | boolean | false | Applies muted disabled styling. |
unstyled | boolean | false | Headless mode — drops Zephora classes so your own CSS can style it. |
…rest | LabelHTMLAttributes<HTMLLabelElement> | — | All native label props (htmlFor…) are forwarded. |