Componentform
Textarea
Multi-line text area matching Input styling.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add textareaOr install the full npm package:
npm install bigbulluiUsage
import { Textarea } from "@/components/ui/textarea";
<Textarea placeholder="Special requests..." rows={3} />Source code
textarea.tsxZero dependencies (only React + utils). Copy and paste directly into your project:
import * as React from "react";
import { cn } from "./lib/utils";
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => (
<textarea
ref={ref}
className={cn(
"flex min-h-20 w-full rounded-md border-2 border-dashed border-input bg-transparent px-3 py-2 font-mono text-sm transition-colors placeholder:text-muted-foreground focus-visible:border-solid focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
/>
)
);
Textarea.displayName = "Textarea";
export { Textarea };
Props
| Prop | Type | Description |
|---|---|---|
| rows | number | Visible text rows. |
| placeholder | string | Placeholder text. |
| disabled | boolean | Disables interaction (default false). |