Marker

Primitive

Field

Gives one form control its label, description and error, and wires them for assistive technology.

When to use

Use it around every Input that has a visible label. Use Input alone only where a visible label cannot fit, with an aria-label.

States

Default
With a description

Enter the name exactly as it appears on the subscription agreement.

RequiredSet required on the control; the label shows the asterisk.
Disabled
Read-onlyThe value can be focused, selected and copied, not changed.
Invalid, from the serverinvalid on the root shows the error; it is read when the control gets focus.

Limited partners copy this into the wire memo.

Use 20 or fewer characters, or bank portals cut the reference short.
Checked when it loses focusType a name without an @ and press Tab. The message for the failed check appears and is announced.
Long label and error
Enter the bank name as it appears on the wire instructions, without abbreviations, so incoming wires match the capital call.

Props

PropTypeDefaultDescription
Field.RootpartDefault –Wraps one control and its parts, in a column. Takes Base UI's Field.Root props, below.
invalidbooleanDefault falseA known error, such as one the server returned. Marks the control aria-invalid and shows Field.Error.
disabledbooleanDefault falseDisables the control and dims the label.
namestringDefault –The name the value is submitted under; wins over the control's.
validationMode"onSubmit" | "onBlur" | "onChange"Default "onBlur"When the browser's checks run. onBlur checks the control when it loses focus and works in a plain form. Use onChange when the answer should come as people type, such as whether a reference is free. onSubmit works only inside a Base UI Form, which Marker does not have yet.
validate(value, formValues) => string | string[] | nullDefault –A custom check that returns the message. A function, so only a client component can pass it.
classNamestringDefault –Places the field: margin, width, grid placement. Never its look.
Field.Labelpart, requiredDefault –The control's visible name, a <label>. Shows an asterisk, hidden from assistive technology, when the control is required.
Field.DescriptionpartDefault –Help for the control, read with it as its description.
Field.ErrorpartDefault –What is wrong and how to fix it. Shows when the root is invalid, when its match check fails, or, with no match, when any check fails. Announced politely when it appears after the page loads.
matchboolean | keyof ValidityStateDefault –On Field.Error: the check this message is for, such as "valueMissing" or "typeMismatch". Without children, the browser's message shows.