JSPM

@jds-jnj/react-captcha

1.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 6
    • Score
      100M100P100Q46884F
    • License MIT

    Package Exports

    • @jds-jnj/react-captcha
    • @jds-jnj/react-captcha/dist/index.js
    • @jds-jnj/react-captcha/dist/react-captcha.esm.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jds-jnj/react-captcha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    jds-react-captcha

    Simplest captcha component.

    JDS react captcha is a user-friendly react captcha component.

    Features

    • Simple and easy to use.

    Installation

    JDS React Captcha requires ReactJS v17+ to run.

    Install the dependencies and devDependencies and start the server.

    npm i jds-react-captcha

    Usage

    You can use the hook using:

    import React, { useState } from 'react'
    import { Captcha } from "jds-react-captcha";
    
    const JDSCaptcha = () => {
        const [captchaValidated, setCaptchaValidated] = useState(false);
        
        return (
            <Captcha length={6} validate={setCaptchaValidated} />
        );
    }

    Props

    JDS React Captcha has 2 props:

    • length - It signifies the captcha length. The captcha has the minimum length of 2 and a maximum size of 8. (Defaults to 4 in cases of exception).
    • validate - It takes a function that recieves the validation status parameter. It is used to set the captcha status in a variable.

    License

    MIT

    Free Software, Hell Yeah!