Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / Field

Function: Field()

Field(props): HtmlNode

Defined in: flow/src/headless.ts:802

Accessibility glue around a single control: wraps a label, the control, an optional description, and an error, wiring for/id/aria-describedby and keeping aria-invalid in sync with the error. Compose <Label>/<Description> manually or pass them as props.

Parameters

props

FieldProps

Returns

HtmlNode

Example

<Field label="Email" description="We never share it." error={this.errors.email}>
  <input value={this.form.email} />
</Field>