Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES

Field

Label, control, description and errors wired together in a single field.

Base UI reference ↗

Your work email, no extra messages.

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add field

Dependencies

What add field installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

  • @zuno/utils

npm

Examples

3 examples · 1 component
field

Your work email, no extra messages.

Forms that guide you

Label, help text and validation. Try submitting an empty email.

field

You can change it later.

Context matters too

Persistent instructions, linked to the control.

field

Managed by your organization.

Available when you need it

A disabled field keeps its structure and context.

API reference

Keeps the props, events and refs of the matching Base UI primitive, plus ZUNO's styles.

PropTypeDefault
name

Field name within the form.

string—
invalid

Marks the field as invalid.

boolean—
disabled

Disables the field's controls.

booleanfalse

States

The states that apply to this component and their visual treatment.

StateTreatment
RestFieldControl with a neutral 1 px border.
Focus visible2 px ring outline; the border takes the same color.
Invalidinvalid or failed validation: destructive border and an associated FieldError.
Invalid with focus2 px destructive outline; the neutral focus ring is not added.
Disableddisabled turns off the control and removes it from the Tab order.
Read-onlyreadOnly keeps the value selectable without allowing edits.

Accessibility

Use FieldLabel to name the control and FieldDescription for persistent instructions. FieldError shows the associated error; compose Field inside Base UI's Form to validate on submit.

The placeholder complements the label. Keep focus visible and explain errors with text. Use disabled to prevent interaction and readOnly when the content should remain selectable.