1.1.2 • Published 7 years ago

react-verify-code v1.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

react-verify-code

A simply graphic verification code component for react.

image.png

Installation

Using npm:

$ npm i --save react-verify-code

Usage

example

import React from 'react'
import ReactDOM from 'react-dom';
import ReactVerifyCode from 'react-verify-code'

class App extends React.Component {
    render() {
        return (
            <div>
                <h1>Example</h1>
                <ReactVerifyCode />
            </div>
        );
    }
}

ReactDOM.render(
    <App />,
    document.getElementById('app')
);

Props:

PropDefaultTypeDescription
width100numbercanvas width
height30numbercanvas height
type"blend"stringresponse validate code
numbers0-9array-
lettersa-z,A-Zarray-
onChangevalue=>voidfunccode change callback
len4numberresponse string's length
ref"react_verify_code"stringcanvas'ref

Development

Want to run demos locally

git clone https://github.com/Slebee/react-verify-code
npm install
npm start
open http://localhost:8080

LICENSE

MIT

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago