Form utilities

Label
v1.2.3
Documentation Under Review

Form labels with size variants and state management for product contexts.

Prefer AI-assisted development?

This documentation is available via the Catalyst MCP Server. Learn how to connect →

The Label component is built on Radix UI Label primitive, providing accessible form labels with support for different sizes, states (danger, disabled), and composition patterns for complex label layouts. It supports Catalyst design tokens and dark mode.

Preview

Installation

npm install @pmi/catalyst-label
import { Label, LabelRoot, LabelSlot } from '@pmi/catalyst-label';

Sizes

Preview

Common Patterns

Danger State

Use the danger prop to indicate error states or validation issues.

Preview

Disabled State

Disabled labels have reduced opacity to indicate inactive form fields.

Preview

Composed Labels

Use LabelRoot and LabelSlot for complex label layouts with additional content like character counts or optional indicators.

Preview
0/100

API Reference

Label

Accepts all standard Radix UI Label props, adding size variants and unstyled prop.

Prop

Type

LabelRoot

Container component for composed label layouts. Accepts the standard props for HTMLElement.

Prop

Type

LabelSlot

Additional content slot for composed labels (e.g., character counts, optional indicators). Accepts the standard props for HTMLElement.

Prop

Type

Accessibility

Label is designed to meet WCAG 2.2 AA standards. The sections below document keyboard behavior and ARIA semantics.

ARIA

  • Automatically applies the correct labelling when wrapping controls or using the htmlFor attribute.

See the Radix UI Label accessibility docs for inherited baseline behavior.

Choosing the Right Component

Use this component when you need accessible form labels. Reach for a different primitive when:

If you need�Use instead
Supplementary informationHelperText
An alternative text styling componentSubText

On this page