A fully customizable, one-time password input component for the web built with React.

Overview

react-otp-input

npm version npm npm All Contributors

A fully customizable, one-time password input component for the web built with React.

see here

Live Demo

CodeSandbox

Installation

NPM

To install the latest stable version:

npm install --save react-otp-input

Basic usage:

import React, { Component } from 'react';
import OtpInput from 'react-otp-input';

export default class App extends Component {
  state = { otp: '' };

  handleChange = (otp) => this.setState({ otp });

  render() {
    return (
      <OtpInput
        value={this.state.otp}
        onChange={this.handleChange}
        numInputs={6}
        separator={<span>-</span>}
      />
    );
  }
}

API

Name
Type Required Default Description
numInputs number true 4 Number of OTP inputs to be rendered.
onChange function true console.log Returns OTP code typed in inputs.
value string / number true '' The value of the OTP passed into the component.
placeholder string false none Specify an expected value of each input. The length of this string should be equal to numInputs.
separator component
false none Provide a custom separator between inputs by passing a component. For instance, - would add - between each input.
containerStyle style (object) / className (string) false none Style applied or class passed to container of inputs.
inputStyle style (object) / className (string) false none Style applied or class passed to each input.
focusStyle style (object) / className (string) false none Style applied or class passed to inputs on focus.
isDisabled boolean false false Disables all the inputs.
disabledStyle style (object) / className (string) false none Style applied or class passed to each input when disabled.
hasErrored boolean false false Indicates there is an error in the inputs.
errorStyle style (object) / className (string) false none Style applied or class passed to each input when errored.
shouldAutoFocus boolean false false Auto focuses input on initial page load.
isInputNum boolean false false Restrict input to only numbers.
isInputSecure boolean false false Masks input characters.
data-cy string false - Test attribute passed to the inputs.
data-testid string false - Test attribute passed to the inputs.

Breaking changes when porting to v1.0.0

react-otp-input is now a controlled component to facilitate functionalities that weren't possible before from the application using it, such as clearing or pre-assigning values. For v1.0.0 and above, a value prop needs to be passed in the component for it to function as expected.

Development

To run the development server:

npm run dev

Checklist

PRs Welcome Open Source Love

  • Add flowtypes
  • Add ESLint, Prettier for code quality
  • Add styling support for states including focus/disabled
  • Write tests

Contributing

GitHub issues GitHub pull requests

Feel free to open issues and pull requests!

License

NPM

Contributors

Thanks goes to these wonderful people (emoji key):


Abhishek Warokar

💻 🎨 🚧 🤔 👀

Aj

💻 🎨 🤔

Aromal Anil

💻 🔧

Gabriele Corti

💻 ️️️️ ♿️

Anoop

💻

Dewansh Rawat

🐛

Ishan Chhabra

💻

yaojie

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Comments
  • Otp Input is not Showing

    Otp Input is not Showing

    • Describe the Feature Request When I am typing inside the OTP inputs nothing is showing even after the inputStyle color set to black
    • Describe Preferred Solution
    question 
    opened by TheSayantan96 20
  • focusInput(0) not working after render

    focusInput(0) not working after render

    What I am trying to do:- I want to click on the label to get focus on the first input field

    How I am Doing? I am using useRef and accesing focusInput() function with arguement 0

    Expected Behavior:- It should focus on the first input Current Behavior:- 0th Input does not get the focus after rendering but after any changes in any input It works 1,2,3 inputs works fine i want the first one to get focused

    • Steps to reproduce the issue: https://codesandbox.io/s/react-otp-input-demo-v2-forked-ng3l1s?file=/src/App.js

    • Relevant error messages and/or screenshots:

    Is there any other way to achieve this? Thanks in advance

    opened by hrithik73 9
  • Masking input characters

    Masking input characters

    • Describe the Feature Request

    Sometimes users need to enter secret OTP's in financial applications and they don't want them to be revealed to nearby users, so it's a kind of must have feature to be able to mask the input characters.

    • Describe Preferred Solution

    We can expose an attribute in API called 'secure' with the default value as false, and can make use of this prop to decide using input type (text vs password).

    enhancement hacktoberfest 
    opened by cloudchallengers 8
  • Ignore text input when isInputNum is true, fixes #50

    Ignore text input when isInputNum is true, fixes #50

    • What does this PR do? When OTP has isInputNum=true, text/letter will not be allowed to be entered in the input boxes.

    type='number' is removed because number input doesn't trigger the onChange when e is entered, thus there is no way to restrict inputting letters in it. So now with type='tel' always, onChange is triggered always and we ignore e letter.

    • Any background context you want to provide? Fixes https://github.com/devfolioco/react-otp-input/issues/50
    opened by xitter 7
  • First Input is not accepting zero as value

    First Input is not accepting zero as value

    • Describe the Feature Request

    • Describe Preferred Solution The First Input element in OTP input is not accepting the zero as a number. Rest all the remaining input takes zero.

    opened by shreyvijayvargiya 6
  • Adding Husky and Lint-Staged for automatic prettifying of files

    Adding Husky and Lint-Staged for automatic prettifying of files

    Signed-off-by: Nirmal Khedkar [email protected]

    • What does this PR do? This PR adds Husky and lint-staged, to automatically run commands when any git hooks are run. Currently, this MR will prettify all .js files in the project.

    • Any background context you want to provide? I tried adding command for lint fixing as well, but when I add it to lint-staged, I get the following errors:

    .../src/demo/index.jsx 23:19 error Parsing error: Unexpected token = .../src/lib/index.jsx 12:6 error Parsing error: Unexpected token Props

    ✖ 2 problems (2 errors, 0 warnings)

    I'm not too familiar with why these errors are occurring so I've left ESLint from the lint-staged area, for now.

    This will fix #203

    opened by nirmalhk7 5
  • Get OTP enabled even if all numbers are not input

    Get OTP enabled even if all numbers are not input

    • Steps to reproduce the issue: In the demo site, when isInputNum is true, clicking either of the arrows enables the Get OTP button.

    • Relevant error messages and/or screenshots: Before clicking arrow image After clicking arrow, the Get OTP button gets enabled. image

    opened by Rishabh510 5
  • Placeholder Fixes

    Placeholder Fixes

    #255 - Updated condition for placeholder length with type check and In demo added maxLength for placeholder as well.

    • What does this PR do? Fix Placeholder issue - placholder not updating value after change in input Number count.

    • Any background context you want to provide? https://github.com/devfolioco/react-otp-input/issues/255 Placeholder not updating

    • Screenshots and/or Live Demo

    bug demo 
    opened by Kathuria 4
  • Issue fixed in which Separators with letters and numbers were considered

    Issue fixed in which Separators with letters and numbers were considered

    • What does this PR do? In this PR, I fixed the issue #195 in which letters and numbers were accepted as separators so I limited the number of separators to hyphen , dot or whitespace. 2020-10-03

    • Any background context you want to provide? So, if separator is valid then only the 'get otp' button will work or else it will be disabled.

    • Screenshots and/or Live Demo Initial Page 2020-10-03 (1) On Clearing the Separator,alert will be displayed 2020-10-03 (2) On Entering dot as separator 2020-10-03 (3) On entering letter or number as separator , an alert will be displayed and 'get otp' button will be disabled. 2020-10-03 (4) On entering whitespace as separator 2020-10-03 (5) On clicking 'Get OTP' button with whitespace as separator 2020-10-03 (7)

    demo 
    opened by Parshwa52 4
  • Incorrect scripts in README.md

    Incorrect scripts in README.md

    Hi there, been using this Component for some time now! Awesome work!

    There aren't necessary steps here. I suppose the commands were changed but the README wasn't updated.

    Screenshot from 2020-10-02 15-29-53

    Screenshot from 2020-10-02 15-30-17

    opened by ShubhankarKG 4
  • Encode the otp

    Encode the otp

    • Add an option for encoding the otp

    • If the user selects this option the user entered otp will be encoded using shift cipher,if during shift cipher encoding of a digit it exceeds 9 , we will do a modulo by 10

    opened by RitikaAg 4
  • Multiple Numbers in one Input

    Multiple Numbers in one Input

    • Describe the Feature Request Can you add multiple Numbers like 4-5 in single input.
    • Describe Preferred Solution There can be a prop for multipleNumbers
    opened by dhwaj1902 0
  • chore: Bump json5, babel-loader, css-loader, tsconfig-paths, html-webpack-plugin, style-loader, webpack and webpack-cli

    chore: Bump json5, babel-loader, css-loader, tsconfig-paths, html-webpack-plugin, style-loader, webpack and webpack-cli

    Bumps json5 to 2.2.2 and updates ancestor dependencies json5, babel-loader, css-loader, tsconfig-paths, html-webpack-plugin, style-loader, webpack and webpack-cli. These dependencies need to be updated together.

    Updates json5 from 2.2.0 to 2.2.2

    Release notes

    Sourced from json5's releases.

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)
    Changelog

    Sourced from json5's changelog.

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)
    Commits
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • d720b4f Improve readme (e.g. explain JSON5 better!) (#291)
    • 910ce25 docs: fix spelling of Aseem
    • 2aab4dd test: require tap as t in cli tests
    • 6d42686 test: remove mocha syntax from tests
    • 4798b9d docs: update installation and usage for modules
    • Additional commits viewable in compare view

    Updates babel-loader from 8.2.2 to 8.3.0

    Release notes

    Sourced from babel-loader's releases.

    v8.3.0

    New features

    Full Changelog: https://github.com/babel/babel-loader/compare/v8.2.5...v8.3.0

    v8.2.5

    What's Changed

    New Contributors

    Full Changelog: https://github.com/babel/babel-loader/compare/v8.2.4...v8.2.5

    v8.2.4

    What's Changed

    Thanks @​loveDstyle, @​stianjensen and @​pathmapper for your first PRs!

    8.2.3

    This release fixes compatibility with Node.js 17

    Thanks @​Reptarsrage!

    Commits

    Updates css-loader from 3.6.0 to 6.7.3

    Release notes

    Sourced from css-loader's releases.

    v6.7.3

    6.7.3 (2022-12-14)

    Bug Fixes

    v6.7.2

    6.7.2 (2022-11-13)

    Bug Fixes

    • css modules generation with inline syntax (#1480) (2f4c273)

    v6.7.1

    6.7.1 (2022-03-08)

    Bug Fixes

    v6.7.0

    6.7.0 (2022-03-04)

    Features

    v6.6.0

    6.6.0 (2022-02-02)

    Features

    • added the hashStrategy option (ca4abce)

    v6.5.1

    6.5.1 (2021-11-03)

    Bug Fixes

    • regression with unicode characters in locals (b7a8441)
    • runtime path generation (#1393) (feafea8)

    v6.5.0

    ... (truncated)

    Changelog

    Sourced from css-loader's changelog.

    6.7.3 (2022-12-14)

    Bug Fixes

    6.7.2 (2022-11-13)

    Bug Fixes

    • css modules generation with inline syntax (#1480) (2f4c273)

    6.7.1 (2022-03-08)

    Bug Fixes

    6.7.0 (2022-03-04)

    Features

    6.6.0 (2022-02-02)

    Features

    • added the hashStrategy option (ca4abce)

    6.5.1 (2021-11-03)

    Bug Fixes

    • regression with unicode characters in locals (b7a8441)
    • runtime path generation (#1393) (feafea8)

    6.5.0 (2021-10-26)

    Features

    • support absolute URL in url() when experiments.buildHttp enabled (#1389) (8946be4)

    ... (truncated)

    Commits

    Updates tsconfig-paths from 3.9.0 to 3.10.1

    Changelog

    Sourced from tsconfig-paths's changelog.

    [3.10.1] - 2021-07-06

    Fixed

    • Add register.js to published files

    [3.10.0] - 2021-07-06

    Added

    • feat(tsconfig-loader): extends config from node_modules (#106). Thanks to @​zorji for this PR!

    Fixed

    Commits

    Updates html-webpack-plugin from 4.5.2 to 5.5.0

    Changelog

    Sourced from html-webpack-plugin's changelog.

    5.5.0 (2021-10-25)

    Features

    • Support type=module via scriptLoading option (1e42625), closes #1663

    5.4.0 (2021-10-15)

    Features

    5.3.2 (2021-06-22)

    Bug Fixes

    • update lodash and pretty error (9c7fba0

    5.3.1 (2021-03-09)

    Bug Fixes

    • remove loader-utils from plugin core (82d0ee8)

    5.3.0 (2021-03-07)

    Features

    • allow to modify the interpolation options in webpack config (d654f5b)
    • drop loader-utils dependency (41d7a50)

    5.2.0 (2021-02-19)

    Features

    5.1.0 (2021-02-12)

    Features

    • omit html tag attribute with null/undefined/false value (aa6e78d), closes #1598

    5.0.0 (2021-02-03)

    ... (truncated)

    Commits
    • 873d75b chore(release): 5.5.0
    • ddeb774 chore: update examples
    • 1e42625 feat: Support type=module via scriptLoading option
    • 7d3645b Bump pretty-error to 4.0.0 to fix transitive vuln for ansi-regex CVE-2021-3807
    • 79be779 [chore] changes actions to run on pull_requests
    • b7e5859 [chore] fixes CI to avoid race conditions
    • 48131d3 chore(release): 5.4.0
    • 16a841a [chore] rebuild examples
    • 3bb7c17 Update index.js
    • e38ac97 Update index.js
    • Additional commits viewable in compare view

    Updates style-loader from 0.21.0 to 3.3.1

    Release notes

    Sourced from style-loader's releases.

    v3.3.1

    3.3.1 (2021-10-21)

    Bug Fixes

    v3.3.0

    3.3.0 (2021-09-21)

    Features

    • added support for supports(), layer() and media from @import at-rules (b9a600c)
    • allow to pass options to insert function through style.use() (#535) (f8ef63b)

    v3.2.1

    3.2.1 (2021-07-20)

    Bug Fixes

    • added the styletagtransform option when it is a module to addBuildDependency (#528) (270513f)

    v3.2.0

    3.2.0 (2021-07-20)

    Features

    Bug Fixes

    • added the insert option when it is a module to addBuildDependency (#527) (3963c0b)

    v3.1.0

    3.1.0 (2021-07-12)

    Features

    • allow to specify the insert option from file, we strongly recommend do it, using the insert option from file will reduce your bundle size, example (#521) (56fc8f0)
    • allow to specify the styleTagTransform option from file, we strongly recommend do it, using the styleTagTransform option from file will reduce your bundle size, example

    Bug Fixes

    ... (truncated)

    Changelog

    Sourced from style-loader's changelog.

    3.3.1 (2021-10-21)

    Bug Fixes

    3.3.0 (2021-09-21)

    Features

    • added support for supports(), layer() and media from @import at-rules (b9a600c)
    • allow to pass options to insert function through style.use() (#535) (f8ef63b)

    3.2.1 (2021-07-20)

    Bug Fixes

    • added the styletagtransform option when it is a module to addBuildDependency (#528) (270513f)

    3.2.0 (2021-07-20)

    Features

    Bug Fixes

    • added the insert option when it is a module to addBuildDependency (#527) (3963c0b)

    3.1.0 (2021-07-12)

    Features

    • allow to specify the insert option from file, we strongly recommend do it, using the insert option from file will reduce your bundle size, example (#521) (56fc8f0)
    • allow to specify the styleTagTransform option from file, we strongly recommend do it, using the styleTagTransform option from file will reduce your bundle size, example

    Bug Fixes

    3.0.0 (2021-06-24)

    ... (truncated)

    Commits
    Maintainer changes

    This version was pushed to npm by evilebottnawi, a new releaser for style-loader since your current version.


    Updates webpack from 4.46.0 to 5.75.0

    Release notes

    Sourced from webpack's releases.

    v5.75.0

    Bugfixes

    • experiments.* normalize to false when opt-out
    • avoid NaN%
    • show the correct error when using a conflicting chunk name in code
    • HMR code tests existance of window before trying to access it
    • fix eval-nosources-* actually exclude sources
    • fix race condition where no module is returned from processing module
    • fix position of standalong semicolon in runtime code

    Features

    • add support for @import to extenal CSS when using experimental CSS in node
    • add i64 support to the deprecated WASM implementation

    Developer Experience

    • expose EnableWasmLoadingPlugin
    • add more typings
    • generate getters instead of readonly properties in typings to allow overriding them

    v5.74.0

    Features

    • add resolve.extensionAlias option which allows to alias extensions
      • This is useful when you are forced to add the .js extension to imports when the file really has a .ts extension (typescript + "type": "module")
    • add support for ES2022 features like static blocks
    • add Tree Shaking support for ProvidePlugin

    Bugfixes

    • fix persistent cache when some build dependencies are on a different windows drive
    • make order of evaluation of side-effect-free modules deterministic between concatenated and non-concatenated modules
    • remove left-over from debugging in TLA/async modules runtime code
    • remove unneeded extra 1s timestamp offset during watching when files are actually untouched
      • This sometimes caused an additional second build which are not really needed
    • fix shareScope option for ModuleFederationPlugin
    • set "use-credentials" also for same origin scripts

    Performance

    • Improve memory usage and performance of aggregating needed files/directories for watching
      • This affects rebuild performance

    Extensibility

    • export HarmonyImportDependency for plugins

    v5.73.0

    ... (truncated)

    Commits

    Updates webpack-cli from 3.3.12 to 5.0.1

    Release notes

    Sourced from webpack-cli's releases.

    v5.0.1

    5.0.1 (2022-12-05)

    Bug Fixes

    • make define-process-env-node-env alias node-env (#3514) (346a518)

    v5.0.0

    5.0.0 (2022-11-17)

    Bug Fixes

    • improve description of the --disable-interpret option (#3364) (bdb7e20)
    • remove the redundant utils export (#3343) (a9ce5d0)
    • respect NODE_PATH env variable (#3411) (83d1f58)
    • show all CLI specific flags in the minimum help output (#3354) (35843e8)

    Features

    • failOnWarnings option (#3317) (c48c848)
    • update commander to v9 (#3460) (6621c02)
    • added the --define-process-env-node-env option
    • update interpret to v3 and rechoir to v0.8
    • add an option for preventing interpret (#3329) (c737383)

    BREAKING CHANGES

    • the minimum supported webpack version is v5.0.0 (#3342) (b1af0dc), closes #3342
    • webpack-cli no longer supports webpack v4, the minimum supported version is webpack v5.0.0
    • webpack-cli no longer supports webpack-dev-server v3, the minimum supported version is webpack-dev-server v4.0.0
    • remove the migrate command (#3291) (56b43e4), closes #3291
    • remove the --prefetch option in favor the PrefetchPlugin plugin
    • remove the --node-env option in favor --define-process-env-node-env
    • remove the --hot option in favor of directly using the HotModuleReplacement plugin (only for build command, for serve it will work)
    • the behavior logic of the --entry option has been changed - previously it replaced your entries, now the option adds a specified entry, if you want to return the previous behavior please use webpack --entry-reset --entry './src/my-entry.js'

    v4.10.0

    4.10.0 (2022-06-13)

    Bug Fixes

    Features

    v4.9.2

    4.9.2 (2022-01-24)

    ... (truncated)

    Changelog

    Sourced from webpack-cli's changelog.

    5.0.1 (2022-12-05)

    Bug Fixes

    • make define-process-env-node-env alias node-env (#3514) (346a518)

    5.0.0 (2022-11-17)

    Bug Fixes

    • improve description of the --disable-interpret option (#3364) (bdb7e20)
    • remove the redundant utils export (#3343) (a9ce5d0)
    • respect NODE_PATH env variable (#3411) (83d1f58)
    • show all CLI specific flags in the minimum help output (#3354) (35843e8)

    Features

    • failOnWarnings option (#3317) (c48c848)
    • update commander to v9 (#3460) (6621c02)
    • added the --define-process-env-node-env option
    • update interpret to v3 and rechoir to v0.8
    • add an option for preventing interpret (#3329) (c737383)

    BREAKING CHANGES

    • the minimum supported webpack version is v5.0.0 (#3342) (b1af0dc), closes #3342
    • webpack-cli no longer supports webpack v4, the minimum supported version is webpack v5.0.0
    • webpack-cli no longer supports webpack-dev-server v3, the minimum supported version is webpack-dev-server v4.0.0
    • remove the migrate command (#3291) (56b43e4), closes #3291
    • remove the --prefetch option in favor the PrefetchPlugin plugin
    • remove the --node-env option in favor --define-process-env-node-env
    • remove the --hot option in favor of directly using the HotModuleReplacement plugin (only for build command, for serve it will work)
    • the behavior logic of the --entry option has been changed - previously it replaced your entries, now the option adds a specified entry, if you want to return the previous behavior please use webpack --entry-reset --entry './src/my-entry.js'

    4.10.0 (2022-06-13)

    Bug Fixes

    Features

    4.9.2 (2022-01-24)

    Bug Fixes

    • respect negatedDescription for flags from schema (#3102) (463b731)

    ... (truncated)

    Commits
    • 4a0f893 chore(release): publish new version
    • 9de982c chore: fix cspell
    • 32d26c8 chore(deps-dev): bump cspell from 6.15.1 to 6.16.0 (#3517)
    • 2788bf9 chore(deps-dev): bump eslint from 8.28.0 to 8.29.0 (#3516)
    • ac88ee4 chore(deps-dev): bump lint-staged from 13.0.4 to 13.1.0 (#3515)
    • 346a518 fix: make define-process-env-node-env alias node-env (#3514)
    • 3ec7b16 chore(deps): bump yeoman-environment from 3.12.1 to 3.13.0 (#3508)
    • c8adfa6 chore(deps-dev): bump @​types/node from 18.11.9 to 18.11.10 (#3513)
    • 0ad8cc2 chore(deps-dev): bump cspell from 6.15.0 to 6.15.1 (#3512)
    • d30f261 chore(deps-dev): bump ts-loader from 9.4.1 to 9.4.2 (#3511)
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore: Bump express from 4.17.1 to 4.18.2

    chore: Bump express from 4.17.1 to 4.18.2

    Bumps express from 4.17.1 to 4.18.2.

    Release notes

    Sourced from express's releases.

    4.18.2

    4.18.1

    • Fix hanging on large stack of sync routes

    4.18.0

    ... (truncated)

    Changelog

    Sourced from express's changelog.

    4.18.2 / 2022-10-08

    4.18.1 / 2022-04-29

    • Fix hanging on large stack of sync routes

    4.18.0 / 2022-04-25

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore: Bump decode-uri-component from 0.2.0 to 0.2.2

    chore: Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • fixed backspace button issues

    fixed backspace button issues

    • What does this PR do?

    This PR fixes the backspace issues.

    Resolves #346

    Resolves #306

    Resolves #100

    If the input field is empty, the cursor now moves to the previous input when Backspace is pressed.

    If the input field is not empty, the cursor erases the value present in the input field and stays on it.

    opened by Vaibhav165 0
Releases(v2.4.0)
  • v2.4.0(Jun 24, 2021)

  • v2.3.1(May 29, 2021)

  • v2.3.0(Oct 31, 2020)

    ✨ Improvements

    1. Add isInputSecure prop. #120 @anoopmsivadas
    2. Add TypeScript typings. #237 @ishan-chhabra

    🐛 Patches

    1. Change input field focus when a code is pasted. #123 @dewanshrawat15
    2. Prevent pasting when input is disabled. #251

    💙 Thank you to the contributors

    1. (DEMO) Add GitHub Pages deploy action. #226 @aromalanil
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Oct 20, 2020)

    ✨ Improvements

    1. Add placeholder support. #119 @aromalanil
    2. Add aria-label to inputs. #129 @borntofrappe

    💙 Thank you to the contributors

    1. (DEMO) Button disabled state. #156 @Binu42
    2. (README) Fix typo. #136 @Surajv311
    3. (README) Remove old commands. #197 @ShubhankarKG
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Sep 29, 2020)

  • v2.0.2(Aug 3, 2020)

  • v2.0.1(Jul 17, 2020)

  • v2.0.0(Jul 6, 2020)

    💥 Breaking Changes

    1. onChange event now always returns a string value regardless of the value of isInputNum.
    2. We now show the default text keyboard instead of a keypad on mobile thereby allowing non-numeric characters to be entered into the fields.

    🐛 Patches

    1. Fix the inputs accepting +, - , e when isInputNum is true. #29, #50
    2. Fix inputs accepting characters in Firefox when isInputNum is true. #85
    3. Fix the leading zeros not being accepted by always providing string value of the input in onChange handler. #25, #30, #71, #81
    4. Fix the numeric keypad being shown when isInputNum is false. #97

    💙 Thank you to the contributors

    @vinitshahdeo, @utkarsh22garg, @Parikshit-Hooda, @nikhilgupta30, @ferdox2, @dhruvmisra, @blenderskool, @vishalsureify, @vishalpolley, @saisrinivaspaila, @robintom, @pratik-276, @nestoralonso, @michizhou, @ghost, @kalpitjain0407, @anikethsaha, @anandprabhakar0507, @Rishabh510, @KieranAnalogRepublic, @joao-arvins, and @xitter

    Source code(tar.gz)
    Source code(zip)
Owner
Devfolio
Building a thriving developer ecosystem in 🇮🇳 + helping organisers host great #hackathons. Want to host yours? Say hi 👋🏼, [email protected]
Devfolio
React Input Format & Mask, tiny (≈800b) component to transform any input component into formatted or masked input. Supports number, date, phone, currency, credit card, etc

RIFM - React Input Format & Mask Is a tiny (≈ 800b) component (and hook) to transform any input component into formatted or masked input. Demo Highlig

RealAdvisor 1.3k Dec 13, 2022
Time-input - A keyboard friendly react component for capturing time

time-input A keyboard friendly react component for capturing time features small UI surface area (just a form input) keyboard friendly (can type times

Alan Clarke 28 Jun 6, 2019
An input of type password implemented with React and TypeScript

An input of type password implemented with React and TypeScript

null 2 Nov 6, 2021
A ReactJS component that allows for multiple text field input, built using the FluentUI library

A ReactJS component that allows for multiple text field input, built using the FluentUI library

Boia Alexandru 1 Sep 22, 2021
A numpad for number, date and time, built with and for React.

React numpad A numpad for number, date and time, built with and for React. It's written with the extensibility in mind. The idea of this project is to

Pietro Ghezzi 130 Dec 21, 2022
Highly configurable & extensible automatically sized input field built with hooks.

Highly configurable & extensible automatically sized input field built with hooks.

Kierien Lee 5 Nov 11, 2022
Input masking component for React. Made with attention to UX.

react-input-mask Input masking component for React. Made with attention to UX. This is a development branch for version 3.0. For the latest stable ver

Nikita Lobachev 2.1k Dec 30, 2022
Masked input React component

MaskedInput A React component for input masking, built on top of inputmask-core. Live Demo Install npm npm install react-maskedinput --save Browser

Jonny Buchanan 721 Nov 30, 2022
React Currency Input Field Component

React Currency Input Field Component

Chun 357 Dec 30, 2022
Headless phone number input component for React. Because phone numbers are hard.

React Headless Phone Input A headless phone number input component built for usability. Phone numbers are hard. Users expect to be able to enter phone

Ben Aubin 26 Nov 16, 2022
React component that handles csv file input and its parsing

react-csv-reader React component that handles csv file input. It handles file input and returns its content as a matrix. Docs: nzambello.github.io/rea

Nicola Zambello 180 Dec 26, 2022
React component for international phone number input

react-phone-number-input International phone number input for React. See Demo Install npm install react-phone-number-input --save If you're not us

Nikolay 837 Dec 21, 2022
International phone number input component for react

Welcome to react-contact-number-input ?? International phone number input component for react Install npm install react-contact-number-input Author ??

Vaibhav Gurnani 15 Nov 9, 2022
A ReactJS input component that manages multiple languages

React-translatable-input A ReactJS input component that manages multiple languages. $ npm install --save react-translatable-input Demo http://belkalab

Belka 26 Jun 17, 2022
A React Hook & Container to help with payment card input fields.

React Payment Inputs A React Hook & Container to help with payment card input fields. React Payment Inputs Demos Requirements Installation Usage With

medipass 303 Dec 22, 2022
Input mask for React, Angular, Ember, Vue, & plain JavaScript

⚠️ This library is not maintained. Pull-requests and issues are not monitored. Alternatives to text-mask include: https://github.com/uNmAnNeR/imaskjs

Text Mask 8.2k Jan 2, 2023
Input mask for React, Angular, Ember, Vue, & plain JavaScript

Text Mask is an input mask library. It can create input masks for phone, date, currency, zip code, percentage, email, and literally anything!

Text Mask 8.2k Jan 4, 2023
Numeric input control with step buttons for Semantic UI React

Numeric input control with step buttons for Semantic UI React

Petri Silen 11 Dec 14, 2022
React Individual Character Input Boxes

react-individual-character-input-boxes React Individual Character Input Boxes (RICIBs) are individual inputs that are separate from each other but fun

Danny Radden 26 Dec 13, 2022