Textarea
Below is the full output of the Textarea component across all variants and sizes.
“Its Important to install the packages & Dependencies to use can intall using
npm install zure-uiand also paste code maunallyFor both React & Next Js“
1. Variants
These define the intent and visual weight of the Textarea.
Preview
2. Sizes
We have provided 3 sizes sm , md & lg.
Preview
3. Example
Made an example for better understanding in which you an take Input and fetch
Important Note “I have used
tailwindcssyou can use normalCSSfor text color”
Preview
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label text displayed above the textarea |
value | string | — | Controlled value of the textarea |
onChange | (event: React.ChangeEvent<HTMLTextAreaElement>) => void | — | Callback fired when the textarea value changes |
placeholder | string | " " | Placeholder text shown when empty |
variant | "default" | "outline" | "filled" | "default" | Visual style variant of the textarea |
size | "sm" | "md" | "lg" | "md" | Size of the textarea |
color | string | "#000" | Text and border color |
error | boolean | false | Displays error state styling |
disabled | boolean | false | Disables the textarea |
rows | number | 4 | Number of visible text lines |
resize | "none" | "vertical" | "horizontal" | "both" | "vertical" | Controls resize behavior |
className | string | "" | Additional Tailwind / CSS classes |
...props | TextareaHTMLAttributes<HTMLTextAreaElement> | — | Pass-through native textarea props |
Installation
You can
Integrate Zure UIBy 2 waysnpm install zure-uiOr byManually creating folder, files & paste the given code ItTotally depends on your workflow.
NPM
NPM
Step 1: Create a React App
Open your terminal and run the following command to create a new React app:
npx create-react-app my-appStep 2: Navigate to Your Project Directory
After creating your project, navigate to your project directory:
cd my-appStep 3: Install the Package
Run the following command in your project root to add the library as a dependency.
npm install zure-uiStep 4: Start Building
You can now import any component directly into your React files.
import {Textarea} from "zure-ui";
export default function Textarea() {
return (
<>
<Textarea value="sm" size="sm" variant="outline" />
<Textarea value="md" size="md" variant="outline"/>
<Textarea value="lg" size="lg" variant="outline"/>
</>
);
}