1.0.6 • Published 5 years ago

thesaurus-input v1.0.6

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Thesaurus Input

Build Status GitHub

A open source React input component, where synonyms are automatically generated for typed words.

Demo Gif

USAGE

This module is distributed via npm

npm install thesaurus-input

Use it like you would any react input component

import ThesaurusInput from "thesaurus-input";

const Container = () => (
  <div className="App">
    <ThesaurusInput apikey="YOURAPIKEY" onChange={handleChangeFunction}/>
  </div>
)

PROPS

apikey

string (required):
Your API key from thesaurus.altervista

onChange

function (required):
Callback invoked when the value is changed. Invoked with a a string representing the state of the input field

thesaurus

boolean
Set to false if you don't want thesaurus functionality (true by default)

placeholder

string
The short hint displayed in the input before the user enters a value. By default "Start typing"

id

string
The id of the input element.

className

string
The CSS class name of the wrapper element.

autofocus

boolean If true, the input will be focused during the first mount.