StringSchemaInputcomponent

StringSchemaInput({ schema, value, onValue, ...props }: StringSchemaInputProps): ReactElement
ParamType
propsStringSchemaInputProps
Props for StringSchemaInput, the StringSchema input variant. required
Return
ReactElement
A TextInput or TextareaInput element bound to the schema.

Show a TextInput for a StringSchema, or a TextareaInput when the schema is multiline, sanitising and formatting values with the schema.

  • Publishes the sanitized value through onValue; the schema's format() only shapes what the input displays (on first render and on blur).
  • A TextareaInput starts at the schema's rows (2 by default for a multiline schema).

Examples

<StringSchemaInput name="email" schema={EMAIL} />