GithubHelp home page GithubHelp logo

miksa1987 / masked-authentication-form Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 200 KB

Masked authentication form. Inspired by a challenge on a Medium post.

HTML 15.80% JavaScript 79.41% CSS 4.79%

masked-authentication-form's Introduction

This project was bootstrapped with Create React App.

masked-authentication-form

This is a React component for an authentication code form, which supports regular expressions for certain input characters only. It was inspired by this post on Medium by Indrek Lasn (Number 3).

Demo of the component is deployed here

Usage

If you wish to use this component, clone the repository and copy the directory "component" to your source directory. Import the component as follows: "import MaskedAuthenticationForm from '/path/to/component/MaskedAuthenticationForm'"

Props: regex: The desired regular expression for input as string. Example: [a-z]. The regular expression is case insensitive. rounded: Toggle rounded corners for the component. onSubmit: The function that is called when "Sign in..." button is clicked. Should take one argument, "code", which is the code in the form, in format "xyz-xyz".

Run the demo

Clone the repository, change to its directory and run "npm install". Then run "npm start" to view the component in development server at http://localhost:3000.

License

This component is released under Creative Commons 4.0 license.

TODO

  • Tests
  • Ability to change the number of inputs
  • Make it real pretty

masked-authentication-form's People

Contributors

miksa1987 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.