# react-inline-input

> A React component for inline editable inputs.

Latest version **1.0.2** (published 2020-08-27) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-08-27 |
| First published | 2020-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Uk Chukundah |
| Maintainers | ukchukx |
| Keywords | react, inline, editable, input |

## Links

- npm: https://www.npmjs.com/package/react-inline-input
- Repository: https://github.com/ukchukx/react-inline-input
- Homepage: https://github.com/ukchukx/react-inline-input#readme
- Issues: https://github.com/ukchukx/react-inline-input/issues
- npm.io page: https://npm.io/package/react-inline-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

- 1.0.2 (latest) — 2020-08-27
- 1.0.1 — 2020-01-18
- 1.0.0 — 2020-01-18

## README

# react-inline-input

> An inline editable input component for React.

Displays as text and becomes editable by clicking or tapping.

![Example](https://miro.medium.com/max/280/0*SSYv6SG9l9CYFLjQ.gif)

You can read how it was built [here](https://medium.com/@ukchukx/1fdcf0050aec)

## Installation

```js
npm install react-inline-input
```

### Browser

```html
<script type="text/javascript" src="https://unpkg.com/react-inline-input"></script>
```

### Module

```js
import InlineInput from 'react-inline-input';
```

## Usage

Once installed, it can be used in a template as:

```html
<InlineInput onInput={...} onBlur={...} ... />
```

See the props table below for the available options.

### Props

| Property | Type | Description | Default |
|:--|:--|:--|:--|
| onBlur | function | Called when the input element has lost focus | null |
| onInput | function | Called when the input value (or selection if `type` is `'select'`) changes | null |
| type | string | The input type. Could be text, number, textarea or select | text |
| placeholder | string | Text to be shown as a placeholder while there is no input |  empty string |
| labelClasses | string | CSS classes for the label element | empty string |
| inputClasses | string | CSS classes for the input element | empty string |
| rows | integer | Textarea rows | 2 |
| cols | integer | Textarea columns | 20 |
| options | array | Provides the options for selects. Each object should have the format `{label: x, value: x}` | [] |

## License

[MIT](http://opensource.org/licenses/MIT)

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