captcha-component-react
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

libkaptcha

Boilerplate code for the Captcha react component library.

Reference: How to build a React component library

Usage:

import { KaptchaCard } from "@aashutosh-lis/libkaptcha";

// to use library css
import "@aashutosh-lis/libkaptcha/dist/style.css"  


function App() {

  //used for backend validation after frontend-library verification of captcha
  const [uuid, setUuid] = useState<string>(''); 
  

  const updateUuid = (value:string)=>{
    setUuid(value);
  }

  return (
    <div className="App">
      <KaptchaCard url="http://localhost:3000" setCaptchaUuid={updateUuid}/>
    </div>
  );
}

export default App;

Building

The library can be built using npm run build. Once built, the built artifacts are present in the dist directory.

To use the library locally , we publish it to the local yalc store using npx yalc publish in the library's root directory.

Then run npx yalc add <library_name> in the project where you want to use the library.

Readme

Keywords

none

Package Sidebar

Install

npm i captcha-component-react

Weekly Downloads

3

Version

0.0.2

License

AGPL-3.0-or-later

Unpacked Size

18.9 kB

Total Files

8

Last publish

Collaborators

  • aashutoshlis