Field
标签、控件及其帮助文字连接在一起;错误信息显示在控件下方。
<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";属性
descriptionReactNode标签下方的一句帮助文字。
errorReactNode错误信息,以危险色显示在控件下方:它将字段标记为无效,并与描述一同朗读。提交失败后,请将焦点移到第一个无效字段,以便读出其错误。
idstring内部控件的 ID,让标签指向它。
invalidboolean将字段标记为无效,但不显示消息。
labelReactNode字段的标签。
requiredboolean = false将字段标记为必填。