1.0.0 • Published 9 months ago

react-pin-code-dev v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

react-pin-code

use of pin code import React from 'react'; import PinCode from "react-pin-code-dev";

define a state with array when show the value of state use join() function to get value as a int

Props you can pass such as value , length ,onChange , inputStyle you can apply your own style or design use inputStyle

const App = () => {

const [code, setCode] = React.useState(Array());
console.log(code.join(""));

return (
    <div>
     <PinCode value={code} length={6} onChange={(value) => setCode(value) } inputStyle={{background:"red"}}  />
    </div>
);

};

export default App;

1.0.0

9 months ago