Skip to content

itsanishmv/Are-you-human

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Are you human 🤖

A demo sign up form to showcase the captcha functionality.

Features

  • Reusable captcha component
  • useGenerateCaptcha
  • dark mode

Usage/Examples

import Captcha from "./components/Captcha/Captcha";
import useGenerateCaptcha from "./hooks/useGenerateCaptcha";

const [input, setInput] = useState("");
// set input on onChange event and  pass it an argument in the below hook
const { captcha, generate, match } = useGenerateCaptcha(input);

//   captcha -> string
//   generate -> generates new characters everytime its called ( please pass the length/size of the captcha to be generated)
//   match -> if passed input and generated captcha matches the value is true other wise its false

return (
  <Captcha generate={generate} captcha={captcha} />
  // pass the captcha and function to the Captcha component as props
);

Installation

To run the app in local machine :-

  1.  Clone the repository
  2. "npm start"

Tech Stack

React js , css

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published