Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-chiptan with all npm packages installed. Try it out:

require("react/package.json"); // react is a peer dependency. require("react-dom/package.json"); // react-dom is a peer dependency. var reactChiptan = require("react-chiptan")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-chiptan v1.1.3

React component renders chipTAN flicker code

react-chiptan

React component renders chipTAN flicker code.

Installing

$ npm i -S react-chiptan

Example

import React from 'react';
import { render } from 'react-dom';
import ChipTAN from 'react-chiptan';

const App = () => (
    <ChipTAN
        data={'17850120452019980412345678041234567804123456789E'}
        width={205}
        height={100}
        bgColor='black'
        barColor='white'
    />
);

render(<App />, document.getElementById("root"));
PropertyTypeDefaultDescription
datastring''ChipTAN code to render.
widthnumber205Canvas width.
heightnumber100Canvas height.
bgColorstring'#000'Canvas background color.
barColorstring'#fff'Vertical bar(s) in canvas color.

Contributing

To contribute, follow these steps:

  • Fork this repo.
  • Clone your fork.
  • Run npm install
  • Run npm start
  • Goto localhost:3001
  • Add your patch then push to your fork and submit a pull request

Acknowledgments

Inspired by chipTAN Flickercodes article

License

MIT @Basim Hennawi

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free