Skip to main content

Text field

  • Data type: string
  • JSON Schema data type: string

The text field component manages string inputs of different kinds, and should be used whenever you want to provide a way to enter text.

Example

import React from "react";
import { createForm, textField, StatefulFormView } from "@fab4m/fab4m";
import "@fab4m/fab4m/css/basic/basic.css";

const form = createForm({
name: textField({
label: "Your name",
description: "Enter your full name",
required: true,
}),
});

export default function TextFieldExample() {
return <StatefulFormView form={form} hideSubmit={true} />;
}

Available Widgets