Theme Playground

Base UI

Label

Accessible text label for form controls. Pair it with htmlFor and compose it with required markers, helper text, or grouped field layouts.

Best for

form field labelshelper and validation groupingsrequired field patterns

Import

import { Label } from "@enadhq/enad-react-sdk/client/ui-resolver"

When to use it

Use Label whenever a control needs an accessible text label. It is the default companion for Input, Checkbox, Select, and grouped form rows.

Even when a layout feels obvious visually, keep the explicit label if the control still needs a durable accessible name.

Composition notes

  • Keep helper copy, hints, and error text adjacent to the field group, not nested inside the label itself.
  • Add required markers or badges inside the label row when needed, but keep the main text short and plain.
  • Use layout utilities on the surrounding container instead of turning Label into a spacing wrapper.

Accessibility guidance

A good label names the field clearly without repeating the placeholder. Placeholders disappear once users type, so they should support the field, not replace the label.

For checkboxes and radios, the same Label component can wrap or sit beside the control. The important part is to keep the association explicit so pointer and keyboard users get the same behavior.

Examples

Live examples you can edit directly in the sandbox.

2 examples

Default

The simplest label and field pairing for forms, search, and account settings.

With required indicator and helper text

Keep required markers and helper copy in the field group so the label still does the accessibility job cleanly.

Component Sets

Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.

Props

PropTypeDefaultDescription
asChildboolean
No description yet.