# react-advanced-input

> react-advanced-input is an input library aiming improve on the base HTML input's by extending on them and bringing them together with extra features.

Latest version **0.1.8** (published 2023-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-advanced-input
pnpm add react-advanced-input
yarn add react-advanced-input
bun add react-advanced-input
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2023-01-17 |
| First published | 2023-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 81.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | jessyp98 |
| Maintainers | jessyp98 |
| Keywords | react, form, input, HTML |

## Links

- npm: https://www.npmjs.com/package/react-advanced-input
- Repository: https://github.com/jessypouliot98/react-advanced-input
- Homepage: https://github.com/jessypouliot98/react-advanced-input#readme
- Issues: https://github.com/jessypouliot98/react-advanced-input/issues
- npm.io page: https://npm.io/package/react-advanced-input

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.8 (latest) — 2023-01-17
- 0.1.7 — 2023-01-12
- 0.1.6 — 2023-01-12
- 0.1.5 — 2023-01-08
- 0.1.4 — 2023-01-08
- 0.1.3 — 2023-01-03
- 0.1.2 — 2023-01-03
- 0.1.1-a — 2023-01-03
- 0.1.1 — 2023-01-03
- 0.1.0 — 2023-01-03

## README

# React Advanced Input

`react-advanced-input` is an input library aiming improve on the base HTML input's by extending on them and bringing them together with extra features.

## Why should you use React Advanced Input ?

`react-advanced-input` is mostly a 1:1 mapping of `input`/`textarea`/`select` to `Input`, but with extra features like simplifying select's and making textarea part of `Input`.

### The future of React Advanced Input

- add `onChangeValue` on all input's to have a normalized version of the changed value instead of passing by the event and figuring things out
- add full new custom inputs, some in mind: "boolean", "int", etc.
- implement a way to extend `<Input>` type's with extra types with first or third-party addon packages

## Installation

Npm
```
npm i --save react-advanced-input
```
Yarn
```
yarn add react-advanced-input
```

## Usage

Importing
```javascript
import Input from 'react-advanced-input'
// or import { Input } from 'react-advanced-input'
```

Example usage
```javascript
const App = () => {
  const [form, setForm] = useState({
    text: '',
    number: 0,
    textarea: '',
    select: '',
  });
  
  const handleChange = (e) => { 
    setForm((prevForm) => ({ 
      ...prevForm,
      [e.target.name]: e.target.value,
    }));
  }
  
  return (
    <>
      <Input
        type="text"
        name="text"
        value={form.text}
        onChange={handleChange}
      />
      <Input
        type="number"
        name="number"
        value={form.number}
        onChange={handleChange}
      />
      <Input
        type="textarea"
        name="textarea"
        value={form.textarea}
        onChange={handleChange}
      />
      <Input
        type="select"
        name="select"
        value={form.select}
        options={[
          { value: 'foo' },
          { value: 'bar', label: 'Ipsum' },
          { value: 'baz', label: 'Baz' },
        ]}
        onChange={handleChange}
      />
    </>
  );
};
```

---
_Source: https://npm.io/package/react-advanced-input · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
