Skip to content
v0.2.10

Textarea

Native multiline input for notes and longer text.

Preview

Use Textarea

Textarea is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
textarea.tsxTSX
"use client";

import { FloodRoot, Field, Textarea } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Field label="Project note" hint="Keep it short and useful.">
        {(control) => <Textarea {...control} rows={3} maxLength={500} />}
      </Field>
    </FloodRoot>
  );
}

Design notes

  • Rows, maxLength, value/defaultValue and form props remain native.
  • The default has no resize grip. Long text scrolls inside the field; a host can opt into native resizing with style={{ resize: "vertical" }}.

API reference

PropValuesDefault
status"error" | "warning" | "success" | "info"—
invalidboolean—
controlSize"sm" | "md" | "lg" | "xl""md"
Native HTML propsTextareaHTMLAttributes<HTMLTextAreaElement>Forwarded
View TypeScript source