# react-editable-input

> react editable input component

Latest version **1.0.0** (published 2016-03-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-editable-input
pnpm add react-editable-input
yarn add react-editable-input
bun add react-editable-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.0 |
| Published | 2016-03-31 |
| First published | 2016-03-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | staticbass |
| Maintainers | staticbass |
| Keywords | react, edit, editable, input |

## Links

- npm: https://www.npmjs.com/package/react-editable-input
- Repository: https://github.com/staticbass/react-editable-input
- Homepage: https://github.com/staticbass/react-editable-input#readme
- Issues: https://github.com/staticbass/react-editable-input/issues
- npm.io page: https://npm.io/package/react-editable-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.0 (latest) — 2016-03-31
- 0.0.4 — 2016-03-31
- 0.0.3 — 2016-03-31
- 0.0.2 — 2016-03-31
- 0.0.1 — 2016-03-31

## README

# React-editable-input

Editable input for React.js

### Install

```sh
$ npm i -S react-editable-input
```

### Example

![alt tag](http://s16.postimg.org/oq5d2dktx/edtiable_input.png)

```javascript
import EditableInput from 'react-editable-input';

// or var EditableInput = require('react-editable-input').default;

class ExampleComponent extends React.Component {
  
  constructor(props) {
    super(props);
    this.state = {
      text: 'admin'
    }
  }
  
  onSave(value) {
    this.setState({ text: value });
  }
  
  render() {
    return (
      <div className="example">
      
        <EditableInput onSave={this.onSave.bind(this)} text={this.state.text} />
        
      </div>  
    )
  }
}

ReactDOM.render(<ExampleComponent />, document.getElementById('app'));
```

### Props

**onSave** <br>
Function that is called when user clicks submit button. (required)

**text** <br>
String that is displayed. (required)

**textClassName** <br>
``ClassName`` prop of text element. Default ``editable-input-text``

**inputClassName** <br>
``ClassName`` prop of input element. Default ``editable-input``

**btnClassName** <br>
``ClassName`` prop of submit button element. Default ``editable-input-submit``

**btnTitle** <br>
Text inside submit button element. Default ``Ok``

**inputType** <br>
Type of input elemet. Default ``text``

### Styles

Add default styles in your ``index.html``.
```html
<link rel="stylesheet" href="../node_modules/react-editable-input/editable_input.css">
```

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