Matterway
    Preparing search index...

    Function inputField

    • Input field component for text input.

      Parameters

      • props: UiInputFieldProps

        Configuration object

        • name

          Name of the component

        • label

          Label text

        • type

          Type of the input field (text, email, password, etc.)

        • placeholder

          Placeholder text

        • defaultValue

          Default value for the input field

        • required

          If true, the field is required

        • disabled

          If true, the field is disabled

        • invalid

          If false/undefined the field is valid. If a string is provided, it will be used as the validation message

      Returns Element

      Basic usage with required props

      inputField({
      name: 'firstName',
      label: 'First Name',
      type: 'text'
      });

      Usage with default value

      inputField({
      name: 'email',
      label: 'Email Address',
      type: 'email',
      defaultValue: 'example@example.com',
      placeholder: 'Enter your email',
      required: true,
      disabled: false
      });