react-tags-editor
v0.0.18
Published
React Tags Editor
Downloads
18
Readme
react-tags-editor
React-Tags-Editor that works out of the box
How to install
npm install react-tags-editor --save
How to use
- Simply add ReactTagsEditor component to use.
- Add ref to the component to get the current tags using
getTags()
import React, {Component} from 'react'
import {render} from 'react-dom'
import TagsEditor from 'react-tags-editor'
class App extends Component {
render () {
return (
<div>
<h1>React Tags Editor</h1>
<TagsEditor ref={c => { this.tagsEditor = c; }}/>
<button onClick={() => alert(this.tagsEditor.getTags())}>
Get Tags
</button>
</div>
)
}
}
render(<App />, document.querySelector('#app'))