‮Skip to content‬
uiify

Field

‮Label/control/error wrapper.‬

‮Browsers‬
Chrome 123+Firefox 121+Safari 17.5+
‮Tier‬
0
‮Bundle compressed‬
668 B
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Published contract‬
‮Test harness‬

‮Playground‬

Field

‮Default‬

Your display name

Invalid

Password

Use at least eight characters.

Message

Up to 500 characters.

‮Disabled‬

Read only

‮API‬

Field.Root

‮Prop‬‮Type‬‮Default‬‮Description‬
id*string—‮Stable id every part passes back as fieldId, so label, control, description and error are wired together in the server markup.‬
invalidbooleanfalse‮Marks the field invalid, exposing data-invalid for styling.‬
requiredbooleanfalse‮Marks the field required, exposing data-required for styling.‬
disabledbooleanfalse‮Marks the field disabled, exposing data-disabled for styling.‬
namestring—‮Accepted for API compatibility; the name belongs on the control and is not rendered on the wrapper.‬
renderReactElement | ((props, state) => ReactElement)—‮Replace the rendered element while keeping behavior and accessibility wiring.‬

Field.Label

‮Prop‬‮Type‬‮Default‬‮Description‬
fieldId*string—‮The same id given to Field.Root, which resolves the htmlFor pointing at the control.‬
disabledbooleanfalse‮Marks the label disabled, exposing data-disabled for styling.‬
requiredbooleanfalse‮Marks the label required, exposing data-required for styling.‬

Field.Control

‮Prop‬‮Type‬‮Default‬‮Description‬
asElementType"div"‮Use input, textarea, select or a custom control. Native props, event handlers, style and ref are forwarded.‬
type / name / autoComplete / minLength / maxLength / pattern / readOnlynative control props—‮Input options belong on Field.Control, including type="password". Standard validation and FormData semantics are preserved.‬
fieldId*string—‮The same id given to Field.Root, which resolves the control id and its aria-labelledby and aria-describedby wiring.‬
disabledbooleanfalse‮Forwards native disabled to input, textarea and select and exposes data-disabled.‬
invalidbooleanfalse‮Sets aria-invalid and adds the error message to the control's aria-describedby.‬
requiredbooleanfalse‮Forwards native required to input, textarea and select, and sets aria-required.‬
renderReactElement | ((props, state) => ReactElement)—‮Replace the rendered element while keeping behavior and accessibility wiring.‬

Field.Description

‮Prop‬‮Type‬‮Default‬‮Description‬
fieldId*string—‮The same id given to Field.Root, which resolves the description id the control points at.‬
disabledbooleanfalse‮Marks the description disabled, exposing data-disabled for styling.‬

Field.Error

‮Prop‬‮Type‬‮Default‬‮Description‬
fieldId*string—‮The same id given to Field.Root, which resolves the error id the control points at when invalid.‬
invalidbooleanfalse‮Renders the error message; the part renders nothing while this is false.‬

‮Keyboard‬

‮Key‬‮Action‬
Tab‮Move focus to/from the control‬
Enter / Space‮Activate when focused (button-like controls)‬

‮Accessibility‬

‮Uses semantic HTML where possible. Inspect rendered markup in the playground — ARIA is added only when native elements are insufficient.‬

‮Styling hooks‬

data-disabled