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
pnpm add @elsikora/keystone-ui-kitUsage
import { Field } from "@elsikora/keystone-ui-kit";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
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | - | The control's label. |
description | ReactNode | - | A hint under the control. |
error | ReactNode | - | 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.