JSPM

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

Package Exports

  • react-slide-captcha
  • react-slide-captcha/dist/styles.css

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 (react-slide-captcha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-slide-captcha

1.Usage

(1) Installation

npm i -S react-slide-captcha

(2) require

1. react 
2. react-dom

(3) example

import SlideCaptcha from 'react-slide-captcha';
import 'react-slide-captcha/dist/styles.css';

<SlideCaptcha
   puzzleUrl={this.state.puzzleUrl}
   bgUrl={this.state.bgUrl}
   onRequest={this.resultCallback}
   containerClassName="test"
/>

2 API

参数 说明 类型 默认值
puzzleUrl URL for puzzlei mage(required) string -
bgUrl URL for background image(required) string -
onRequest requeset callback(required) (validateValue: number, validatedSuccess: any, validatedFail?: any) => void -
slidedImage image for slided(optional) string '>'
slidedImageSuccess success image for slided(optional) string '>'
slidedImageError error image for slided(optional) string 'X'
containerClassName container class(optional) any -
style container style(optional) object -
tipsText text for tips(optional) string -
tipsClassName tips class(optional) any -
tipsStyle tips style(optional) object -
robotValidate robot validate config(optional) object: { offsetY: number, handler: () => any,} -
reset component reset type(optional) string auto
onReset reset call back(optional) () => any -