react-simple-input-ui
v1.0.6
Published
A simple input UIs with multiple variant of themes
Downloads
9
Maintainers
Readme
react-simple-input-ui
A simple and lightweight React component for handling input fields with minimal setup. Perfect for quick projects or when you need an easy-to-use input component.
Features
- Lightweight and simple to use
- Customizable via props
- Built with accessibility in mind
- Suitable for both controlled and uncontrolled components
Installation
Install the package via npm:
npm install react-simple-input-ui
or using yarn:
yarn add react-simple-input-ui
Usage
Here’s a basic example of how to use the react-simple-input-ui
component:
import React, { useState } from "react";
import SimpleInput from "react-simple-input-ui";
function App() {
const [value, setValue] = useState("");
const handleChange = (e) => {
setValue(e.target.value);
};
return (
<div>
<h1>Example Input</h1>
<SimpleInput
value={value}
onChange={handleChange}
placeholder="Type something..."
/>
</div>
);
}
export default App;
Props
| Prop | Type | Default | Description |
| ------------- | -------- | -------------- | ----------------------------------------- |
| value
| string
| ""
| The input value. |
| onChange
| func
| undefined
| Function to handle input changes. |
| placeholder
| string
| "Enter text"
| Placeholder text for the input. |
| type
| string
| "text"
| The type of input (e.g., text, password). |
Contributing
Feel free to submit issues and pull requests. All contributions are welcome!
License
This project is licensed under the MIT License.