Componentform0.34 KB gzipZero dependencies
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
tsx3 lines
import { Textarea } from "@/components/ui/textarea"; <Textarea placeholder="Special requests..." rows={3} />Source code
textarea.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxtextarea.tsx21 lines
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
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Textarea } from "@/components/ui/textarea"; <Textarea />| Prop | Type | Description |
|---|---|---|
| rows | number | Visible text rows. |
| placeholder | string | Placeholder text. |
| disabled | boolean | Disables interaction (default false). |