Label

A form label: 14px, weight 500, ink. Use it directly when you wire a control yourself; Field renders one for you.

StableSource

Import

tsx
import { Label } from "@merid/react";

Examples

Required

required appends an * that is hidden from assistive tech. It is only a visual cue — set required on the control too so it is announced and validated.

Disabled

disabled dims the label to match a disabled control. It does not disable anything by itself.

API reference

Label forwards its ref to the <label> and passes other label attributes (htmlFor, id, …) through.

PropTypeDefaultDescription
requiredbooleanfalseAppends a visual * marker, hidden from assistive tech.
disabledbooleanfalseDims the label to match a disabled control.
htmlForstring–id of the control the label names.

Styling

HookValues
.mrd-labelRoot <label>
.mrd-label__requiredThe required marker
data-disabledPresent when disabled

Accessibility

  • Always connect the label with htmlFor matching the control's id; clicking the label then focuses the control and it becomes its accessible name.
  • The * is aria-hidden; “required” is announced from the control's own required attribute.

Guidelines

Do

Keep labels short nouns — “Email”, “Company name” — and always visible.

Avoid

Rely on the placeholder as the only label.