Skip to content

Click Captcha

Text click verification with 200+ Chinese vocabulary support. Each word has no duplicate characters, random decoy characters are inserted, and prompt images prevent machine recognition.

Example

javascript
import { ClickCaptcha } from '@captcha-pro/core'

const captcha = new ClickCaptcha({
  el: '#click-captcha',
  width: 300,
  height: 170,
  count: 3,
  onSuccess: () => console.log('Verification passed!')
})

const points = captcha.getClickPoints()

Options

OptionTypeDefaultDescription
elstring | HTMLElement-Container element or selector
widthnumber300Container width
heightnumber170Container height
countnumber3Number of click points
showRefreshbooleantrueShow refresh button
classNamestring'captcha-click'Custom class name
verifyMode'frontend' | 'backend''frontend'Verification mode
backendVerifyBackendVerifyOptions-Backend verification config
securitySecurityOptions-Security options
onSuccess() => void-Success callback
onFail() => void-Fail callback
onRefresh() => void-Refresh callback

See API Options for BackendVerifyOptions and SecurityOptions.

Instance Methods

MethodDescription
verify(data)Manually verify captcha
reset()Reset captcha state
refresh()Generate new captcha
destroy()Destroy captcha instance
getClickPoints()Get clicked points
getSignedData()Get signed data for backend verification
getStatistics()Get verification statistics
resetStatistics()Reset statistics

Released under the MIT License.