A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tpkahlon/captcha-image below:

tpkahlon/captcha-image: A simple captcha image generator.

A simple captcha image generator.

Play with sandbox example here: Demo

You can pass following parameters to Captcha instance in order to generate custom Captcha image

Attributes Values font / String '35px Arial' align / String 'center' baseline / String 'middle width / Number 300 height / Number 150 bgColor / String #eee color / String #222 length / Number / Length of text 7

Final outcome looks like this:

<img src="..." data-key="..." />
import Captcha from 'captcha-image';

const captchaImage = new Captcha(
  '35px Arial',
  'center',
  'middle',
  300,
  150,
  '#eee',
  '#111',
  6
).createImage();

function createMarkup(source) {
  return { __html: source };
}

function MyCaptcha() {
  return <div dangerouslySetInnerHTML={createMarkup(captchaImage)} />;
}

function App() {
  return (
    <div className='App'>
      <MyCaptcha />
    </div>
  );
}

export default App;

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4