Skip to Content

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

1. Variants

These define the intent and visual weight of the Input.

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”

Hi! Welcome to Zure UI


Props

PropTypeDefaultDescription
labelstringLabel text displayed for the input field.
valuestringCurrent value of the input (controlled component).
onChangefunctionCallback fired when the input value changes.
placeholderstring" "Placeholder text shown inside the input.
typestring"text"HTML input type (e.g. text, password, email).
size"sm" | "md" | "lg""md"Controls the size of the input.
variantstring"default"Visual style variant of the input.
disabledbooleanfalseDisables the input when set to true.
errorbooleanfalseShows error state styling when true.
colorstring"black"Text or border color of the input.
classNamestring""Additional CSS classes for custom styling.
...propsobjectAny extra props passed to the native input element.

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.

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