Socket
Book a DemoInstallSign in
Socket

react-word-input

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-word-input

React functional component for input hinted word

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

WordInput is a react functional component for input hinted word.

It take value as the hinted word and callback functions onComplete/onEnter which return the word entered by user.

Working Demo

LIVE DEMO

Installation

This module is installed via npm:

npm install react-word-input

Usage

import './App.css';
import { WordInput } from 'react-word-input';

function App() {

  const print = (word) => {
    console.log(word);
  }

  return (
    <div className="App">
      <WordInput className='word' value={'W_R_ __P_T'} onChange={print} autoFocus />
    </div>
  );
}

export default App;

API

NameTypeRequiredDefaultDescription
onChangeFunctionfalse-Returns word everytime when word is changed
onCompleteFunctionfalse-Returns word when word is filled
onEnterFunctionfalse-Returns word when user press enter
valueStringtrue-The value of the hinted word
classNameStringfalse-Class for input element
disabledBooleanfalsefalseDisables the input
autoFocusBooleanfalsefalseAuto focuses input on initial page load
spellCheckBooleanfalsefalseCheck is word spells correct or not

Author

Satyam Lohiya

Keywords

react

FAQs

Package last updated on 05 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.