Label

Form label element

UI PrimitiveForm Inputs

Overview

Built on Radix UI's Label primitive. Renders a <label> element that associates with its sibling input. Supports a required indicator and disabled peer styling.

Usage

import { Label, Input } from "@leanicon/web-builder-library";

Notes

  • Accepts all standard Radix Label.Root props.
  • When paired with a disabled input (peer-disabled), the label automatically reduces opacity.
  • The required asterisk is aria-hidden="true" — use required on the input itself for accessibility.
  • Dark mode is handled via semantic tokens.

Props

NameTypeDefaultRequiredDescription
asChildboolean—No
requiredboolean—No