Component

Textarea

Multi-line text input components with various styling options

  • Component
  • Tailwind
  • MIT

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.dev/library/tailwind/components/input/textarea/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Input/textarea
registry path: Tailwind/Components/Input/textarea

Source

Implementation

code.html
<!-- Textarea - Default -->
<div>
  <label class="block text-sm font-medium text-gray-700 mb-1">Message</label>
  <textarea rows="4" placeholder="Write your message here..." class="w-full px-4 py-3 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors resize-none"></textarea>
</div>

<!-- Textarea - Auto-resize -->
<div class="mt-4">
  <label class="block text-sm font-medium text-gray-700 mb-1">Description</label>
  <textarea rows="3" placeholder="Tell us more about your project..." class="w-full px-4 py-3 bg-gray-50 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 focus:bg-white transition-colors resize-y min-h-[80px]"></textarea>
</div>

<!-- Textarea - With Counter -->
<div class="mt-4">
  <label class="block text-sm font-medium text-gray-700 mb-1">Bio</label>
  <textarea rows="3" maxlength="150" placeholder="Write a short bio..." class="w-full px-4 py-3 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500 transition-colors resize-none"></textarea>
  <p class="mt-1 text-xs text-gray-500 text-right">0/150 characters</p>
</div>

<!-- Textarea - Minimal / Chat Style -->
<div class="mt-4">
  <textarea rows="4" placeholder="Type your message..." class="w-full px-4 py-4 bg-gray-100 border-0 rounded-2xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white transition-colors resize-none"></textarea>
</div>
23 lines UTF-8 · LF · Spaces: 2

AI-ready

Available to your agent.

This component is reachable through the DevSnips CLI, MCP server and Skills integrations — one registry, one resource path.

Resource path

devsnips://components/input/textarea

Continue browsing

View all