Create Field API

Create Field API

createField(args1, args2)

Args 1

  • Object components

Args 2

NameTypeDescription
suspenseFallback (TBD)ReactNodeFallback content to display when the field is in suspense.
classNames{ description?: string; label?: string; message?: string; input?: string; root?: string; }Custom class names for various parts of the field.
components{ root?: keyof JSX.IntrinsicElements; label?: keyof JSX.IntrinsicElements; message?: keyof JSX.IntrinsicElements; description?: keyof JSX.IntrinsicElements; }Custom components for various parts of the field.

Return Type createField

NameTypeDescription
namestringName of the field.
classNamestringCustom class name for the field.
inputClassNamestringCustom class name for the input element.
labelClassNamestringCustom class name for the label element.
messageClassNamestringCustom class name for the message element.
descriptionClassNamestringCustom class name for the description element.
ClassNamestringAnother custom class name (possibly duplicate, consider revising).
descriptionstringDescription of the field.
disabledbooleanIndicates if the field is disabled.
idstringID of the field.
labelstringLabel text for the field.
placeholderstringPlaceholder text for the input element.
requiredbooleanIndicates if the field is required.
typeHTMLInputTypeAttributeType of the input element.
suspenseFallbackReactNodeFallback content to display when the field is in suspense.
componentkeyof TComponent type of the field.
More props<T>The props based on component prop