ErlangFormDocs v1.0.0
Basic fields

Textarea

Render a multiline string input.

Use z.string() with type: "textarea" for multiline text. Its value remains a string. Set .min() and .max() in the schema for length validation; additional attributes such as rows require a custom component.

Usage

Use your form instance from useForm. See the initial setup.

example.tsx
const schema = z.object({ bio: z.string() });

<ErlForm
  form={form}
  schema={schema}
  fieldConfig={{
    bio: { type: "textarea", placeholder: "About you" },
  }}
/>

On this page