Skip to Content
ComponentsTextarea

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-ui and also paste code maunally For both React & Next Js

1. Variants

These define the intent and visual weight of the Textarea.

2. Sizes

We have provided 3 sizes sm , md & lg.

3. Example

Made an example for better understanding in which you an take Input and fetch

Important Note “I have used tailwindcss you can use normal CSS for text color”

Live Preview
Typed content will appear here…

Props

PropTypeDefaultDescription
labelstringLabel text displayed above the textarea
valuestringControlled value of the textarea
onChange(event: React.ChangeEvent<HTMLTextAreaElement>) => voidCallback fired when the textarea value changes
placeholderstring" "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
colorstring"#000"Text and border color
errorbooleanfalseDisplays error state styling
disabledbooleanfalseDisables the textarea
rowsnumber4Number of visible text lines
resize"none" | "vertical" | "horizontal" | "both""vertical"Controls resize behavior
classNamestring""Additional Tailwind / CSS classes
...propsTextareaHTMLAttributes<HTMLTextAreaElement>Pass-through native textarea props

Installation

You can Integrate Zure UI By 2 ways npm install zure-ui Or by Manually creating folder , files & paste the given code It Totally depends on your workflow.

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-app

Step 2: Navigate to Your Project Directory

After creating your project, navigate to your project directory:

cd my-app

Step 3: Install the Package

Run the following command in your project root to add the library as a dependency.

npm install zure-ui

Step 4: Start Building

You can now import any component directly into your React files.

Textarea.jsx
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"/> </> ); }
Last updated on