Skip to content

Forms

Field

A control with its label, a hint and an error; it wires the ids a screen reader needs.

Shown to your operators.

Installation

Terminal
pnpm add @elsikora/keystone-ui-kit

Usage

Import
import { Field } from "@elsikora/keystone-ui-kit";
docs/field/default.example.tsx
import { Field, Input } from "@elsikora/keystone-ui-kit";
export default function FieldDefaultExample() {  return (    <Field label="Studio name" description="Shown to your operators.">      <Input placeholder="North Star Games" />    </Field>  );}

Examples

Default

Shown to your operators.

With an error

The error sits under the control with a mark and is read through aria-describedby.

Enter a number above 0.

Horizontal

API reference

Field

PropTypeDefaultDescription
labelReactNode-The control's label.
descriptionReactNode-A hint under the control.
errorReactNode-An error under the control; the control is marked invalid.
orientation"vertical" | "horizontal""vertical"Label above, or after a checkbox.

Notes

  • Input, Select and Checkbox read their id and descriptions from the field around them.