Field

A label, one control, and a description or error, connected for assistive technology.

Installation

Examples

Default

Field gives its one child an id for the label and points its aria-describedby at the note under it.

demo.tsx

Shown on the itinerary.

Error

error takes the description's place in red and sets aria-invalid on the control.

error.tsx

Enter an email address.

With a textarea

It takes any control that accepts an id, such as a Textarea.

textarea.tsx

Only you can see them.

Anatomy

Each part's data-slot, which a theme styles, is beside it.