Skip to content
العربية
Forms

Textarea

Grows with the text up to 24 rem, then scrolls.

import { Textarea } from "@percentsa/ui";

Examples

0 of 500 characters
Code
export function TextareaExample() {
  const t = useT();
  const [text, setText] = useState("");
  return (
    <Field label={t("Message", "الرسالة")} count={text.length} max={500} className="w-full max-w-md">
      <Textarea maxLength={500} value={text} onChange={(e) => setText(e.target.value)} placeholder={t("Tell us about the project", "أخبرنا عن المشروع")} />
    </Field>
  );
}