Field
A label, a control and its help, wired together; an error shows under the control.
<Fieldset legend="New key" description="Applications use this key to call the gateway." className="w-400">
<Field label="Name" description="Shown in logs and the audit log.">
<Input placeholder="checkout-web" />
</Field>
<Field label="Expires" optional>
<Select
options={[
{ value: "never", label: "Never" },
{ value: "30", label: "In 30 days" },
{ value: "90", label: "In 90 days" },
]}
defaultValue="90"
/>
</Field>
</Fieldset>import { Field, Fieldset } from "@logicplanes/kaeso-ui";Props
descriptionReactNodeOne sentence of help under the label.
errorReactNodeThe error message, shown under the control in the danger color: it marks the field invalid and is read out with the description. After a failed submit, move focus to the first invalid field so its error is heard.
idstringThe id of the control inside, so the label points to it.
invalidbooleanMarks the field invalid without a message.
labelReactNodeThe field's label.
requiredboolean = falseMarks the field as required.