Skip to content

Label

Free

Names a control that is not in a Field, such as a checkbox or a switch row. It has the look of form labels and fades when its control is disabled.

  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Link the label to its control with htmlFor and the control id, or put the control inside it. Inside a Field, use FieldLabel.

The sample also uses Switch. One command adds them with this item:

weekly-digest-switch.tsx

Label

<label>
PropTypeDefaultDescription
size"default""sm""default"default: the label look of the form components (14/20, weight 500, foreground). sm: the meta look (12/16, weight 400, muted-foreground) for a small option next to a Checkbox or Switch.
...props<label> attributes—Every other attribute goes to the <label>, with a ref.
  • Link it to its control with htmlFor and the control id, or put the control inside it.
  • Put a Checkbox or a Switch inside the label, first: the whole row then toggles the control.
  • Use size="sm" for a small option in a dense card.
  • Inside a form, with help or an error, use the FieldLabel of Field.

Label is a native <label>. With htmlFor, a click on the label focuses or toggles its control.

A Base UI Checkbox, Radio, or Switch puts its id on its hidden input. Base UI reads the label of that input and sets aria-labelledby on the control, so a screen reader reads the label as the name.

With the control inside the label, the full row is the hit area of the control.

When the control is disabled, the label text fades to 50% and the cursor shows not-allowed.

  1. AddedLabel.
Open the release