alexander-rukin

Textarea

Forms

About

A multi-line text field with a focus ring, error state, disabled state, optional auto-growing height, and a live character counter for forms that collect longer text like notes or descriptions.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Textarea to your project and fits it to your theme.

Code

How Textarea is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { Textarea } from "@/components/ui/textarea";
import { useState } from "react";

export default function TextareaDemo() {
  const [note, setNote] = useState("");

  return (
    <div className="flex min-h-screen w-full items-center justify-center bg-background p-10 text-foreground">
      <div style={{ flex: "1 1 320px", maxWidth: 420, width: "100%" }}>
        <Textarea
          label="Note (autoResize + counter)"
          value={note}
          onChange={setNote}
          placeholder="Type away - the field grows with the text…"
          autoResize
          maxLength={280}
          showCount
        />
      </div>
    </div>
  );
}

More by alexander-rukin

View all
  • Carousel

    Carousel

    17
  • Progress

    Progress

    1
  • Filter Chip

    Filter Chip

    1
  • Combobox

    Combobox

  • Tooltip

    Tooltip

  • Card

    Card

  • Range Slider

    Range Slider

  • Kit Button

    Kit Button

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19