Home Components Textarea
React Textarea Components
21 free React textareas built with Tailwind CSS and shadcn/ui conventions. Copy the code or install with the shadcn CLI. Great for comments, auto-resize, and character counts.
Textarea 1 : Plain textarea with no label, a soft primary focus ring and slightly rounded corners.Textarea 2 : Basic textarea with a visible label above it and a soft primary focus ring.Textarea 3 : Labelled textarea with a small right-aligned helper note shown underneath the field.Textarea 4 : Required textarea with a red asterisk on the label for mandatory issue descriptions.Textarea 5 : Labelled textarea that shows an emerald green border and ring when focused.Textarea 6 : Note textarea with a pen icon placed inside the field at the top left.Textarea 7 : Idea textarea with a lightbulb icon placed inside the field at the top right.Textarea 8 : Textarea in an error state with a red border and an inline validation message below.Textarea 9 : Labelled textarea with an Optional tag aligned to the right of the label.Textarea 10 : Textarea with its label sitting on the top border line, like an outlined field.Textarea 11 : Textarea with a floating label that moves up onto the border on focus or input.Textarea 12 : Disabled textarea with dimmed styling and a not-allowed cursor for auto-generated content.Textarea 13 : Read-only textarea with a muted background showing pre-filled output that cannot be edited.Textarea 14 : Auto-growing textarea that expands with its content up to a set maximum height.Textarea 15 : Fixed-size textarea with the resize handle turned off so users cannot drag it.Textarea 16 : Textarea with the label placed inside the same bordered box, above the text area.Textarea 17 : Reply textarea with a small Post Reply button underneath, suited to comment threads.Textarea 18 : Textarea with a 200 character limit and a live counter of characters remaining.Textarea 19 : Three stacked textareas showing compact, standard and expanded height sizes.Textarea 20 : Project details textarea with left-aligned hint text below suggesting what to include.Textarea 21 : Filled textarea with a muted background and no visible border until focused.
About React Textarea Components A React textarea is a multi-line text field for longer input, like comments, messages, or descriptions. Watermelon UI textareas are styled native textarea elements built with Tailwind CSS, using field-sizing-content so they grow with their content in browsers that support it. Add one with the shadcn CLI, then pair it with a Label and set rows, maxLength, or placeholder as needed.
When to use it Comment boxes and chat message composers. Feedback and support forms. Bio or description fields in a profile. When to use something else Use Input Mask when the value has a fixed format like a phone or card number. Use Form when the textarea is one of several fields that need validation. Frequently asked questions How do I make a shadcn textarea auto-resize? The textarea uses the CSS field-sizing: content property, so it grows with its text in browsers that support it. For older browsers, set the height from scrollHeight in an onChange handler.
Why does rows not work on a shadcn textarea? The textarea uses field-sizing-content, which sizes it to its text and ignores rows in browsers that support it. Add field-sizing-fixed to its className to make rows work again, or set a height class like min-h-32.
How do I stop the user from resizing the textarea? Add the Tailwind class resize-none. Use resize-y to allow only vertical resizing.
How do I use a textarea with react-hook-form? Spread register("fieldName") onto it, since it is a native textarea. Show the error message from formState.errors below it.
How to use React Textarea Components Start from a React project with Tailwind CSS and shadcn/ui set up. Next.js, Vite, Remix, and Astro all work. Run npx shadcn@latest add https://registry.watermelon.sh/r/textarea-1.json to add the source files to your project. Import it where you need it, then edit the Tailwind classes and design tokens to match your product. Dependencies installed with it: react-icons.
The code is yours: it lives in your repository, so there is no runtime package to keep updated. Watermelon UI is free and open source under the MIT license.
More: Free React components , UI library alternatives , guides .