0.1.1 ā€¢ Published 2 years ago

capitcha-npm v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Logo

Capitcha component

šŸŽ‰ A React js component to generate random captcha (digits & characters)

Authors

Features

  • Choose the number of digits/characters
  • You can customise it as you want
  • Resizable
  • Cross platform

Installation

Install Capitcha with npm

  npm install capitcha-npm

Usage/Examples

import { Capitcha } from 'capitcha-npm';

function App() {
    const [value, setValue] = useState(null);

    return (
        <Capitcha setCaptchaText={setValue} /> // (setValue) the function that change the state of your value 
    );
}

Documentation

Documentation

PropsDescriptionDefault Value
setCaptchaTextReturn the value to your state (pass the function to update your state)
captchaSizeCaptcha value size of characters6
defaultCaptchaTextYou can make a default value to your captcha. When you reload the captcha the value will be changedgh97dp
reloadBackgroundReload button background color#494992
captchaCustomClassAssign a custom className to captcha
reloadColorReload button color#FFFFFF
borderTypeReload button border typedashed
borderColorCaptcha border color#4DACF5
backgroundColorCaptcha background color#FFFFFF
iconWidthReload button icon width25
iconHeightReload button icon height25
reloadCustomClassAssign a custom className to reload button

šŸ”— Links

linkedin twitter