Input
Below is the full output of the Inpu 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 Input.
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
Hi! Welcome to Zure UI
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label text displayed for the input field. |
value | string | — | Current value of the input (controlled component). |
onChange | function | — | Callback fired when the input value changes. |
placeholder | string | " " | Placeholder text shown inside the input. |
type | string | "text" | HTML input type (e.g. text, password, email). |
size | "sm" | "md" | "lg" | "md" | Controls the size of the input. |
variant | string | "default" | Visual style variant of the input. |
disabled | boolean | false | Disables the input when set to true. |
error | boolean | false | Shows error state styling when true. |
color | string | "black" | Text or border color of the input. |
className | string | "" | Additional CSS classes for custom styling. |
...props | object | — | Any extra props passed to the native input element. |
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 { useState } from "react";
import {Input} from "zure-ui";
export default function InputDemo() {
const [name, setName] = useState("");
return (
<div className="text-black">
<Input
label="Name"
color="#000000"
size="md"
value={name}
onChange={(e) => setName(e.target.value)}
/>
{/* show data below */}
<p className="text-black text-sm m-4">Hi! <span className="font-semibold text-orange-500 uppercase">{name}</span> Welcome to Zure UI </p>
</div>
);
}