psytask - v1.1.1
    Preparing search index...

    Function TextField

    • Text input field component for capturing string values

      Parameters

      • props: BaseFieldProps<string> & { inputType?: "text" | "password" | "email" | "URL" }
        • OptionalinputType?: "text" | "password" | "email" | "URL"

          HTMLInputElement.type

      Returns { node: HTMLDivElement; data: () => { value: string } }

      using emailField = app.scene(TextField, {
      defaultProps: {
      id: 'email',
      inputType: 'email',
      label: 'Email Address',
      validate: (value) =>
      /.+@.+\..+/.test(value) || 'Please enter a valid email',
      },
      });
      const data = await emailField.show();
      console.log(data.value); // string