Label

The caption for a form control. Clicking it focuses or toggles the control it names, and it dims with a disabled one.

tsx
import { Label } from "@pestoui/core"

With a field

Point htmlFor at the control's id. Field wraps this pairing and adds helper and error text; reach for a bare Label when you are laying the row out yourself.

Beside a checkbox

The label is part of the hit target, so a 20px checkbox is as easy to press as its sentence is long.

Props

PropTypeDefaultDescription
htmlForstring—The id of the control this label names.
classNamestring—Merged onto the label.
…propsReact.ComponentProps<"label">—Everything else lands on the label element.

Pesto UI · 117 documented components