Skip to content

wenlng/go-captcha-solid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Go Captcha Solid Package

yarn add go-captcha-solid # or npm install go-captcha-solid # or pnpm install go-captcha-solid

πŸ–– Click Mode Captcha

import GoCaptcha from 'go-captcha-solid'; <GoCaptcha.Click config={{}} data={{}} events={{}} />

params

// config = {} interface Config { width?: number; height?: number; thumbWidth?: number; thumbHeight?: number; verticalPadding?: number; horizontalPadding?: number; showTheme?: boolean; title?: string; buttonText?: string; } // data = {} interface Data { image: string; thumb: string; } // events = {} interface Events { click?: (x: number, y: number) => void; refresh?: () => void; close?: () => void; confirm?: (dots: Array<CaptchaDot>) => boolean; }

πŸ–– Slide Mode Captcha

import GoCaptcha from 'go-captcha-solid'; <GoCaptcha.Slide config={{}} data={{}} events={{}} /> <GoCaptcha.SlideRegion config={{}} data={{}} events={{}} />

Parameter Reference

// config = {} interface Config { width?: number; height?: number; thumbWidth?: number; thumbHeight?: number; verticalPadding?: number; horizontalPadding?: number; showTheme?: boolean; title?: string; } // data = {} interface Data { thumbX: number; thumbY: number; thumbWidth: number; thumbHeight: number; image: string; thumb: string; } // events = {} interface Events { move?: (x: number, y: number) => void; refresh?: () => void; close?: () => void; confirm?: (point: CaptchaPoint) => boolean; }

πŸ–– Rotate Mode Captcha

import GoCaptcha from 'go-captcha-solid'; <GoCaptcha.Rotate config={{}} data={{}} events={{}} />

Parameter Reference

// config = {} interface Config { width?: number; height?: number; thumbWidth?: number; thumbHeight?: number; verticalPadding?: number; horizontalPadding?: number; showTheme?: boolean; title?: string; } // data = {} interface Data { angle: number; image: string; thumb: string; } // events = {} interface Events { rotate?: (angle: number) => void; refresh?: () => void; close?: () => void; confirm?: (angle: number) => boolean; }

πŸ–– Button

import GoCaptcha from 'go-captcha-solid'; <GoCaptcha.Button />

Parameter Reference

interface _ { config?: CaptchaConfig; clickEvent?: () => void; disabled?: boolean; type?: "default" | "warn" | "error" | "success"; title?: string; } export interface CaptchaConfig { width?: number; height?: number; verticalPadding?: number; horizontalPadding?: number; }

About

πŸ–– GoCaptcha of Solid, which implements click mode, slider mode, drag-drop mode and rotation mode.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published