Skip to content

A React Input Component with synonyms suggestions as you type.

License

Notifications You must be signed in to change notification settings

nickakey/ThesaurusInput

Repository files navigation

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.

About

A React Input Component with synonyms suggestions as you type.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published