Widget Modes

Choose the display mode that best fits your user experience.

Checkbox Mode

The classic approach. Users click a checkbox to verify they are human. Best for high-security forms like login and registration.

javascript
gkCaptcha.render('container', {
  siteKey: 'your-site-key',
  mode: 'checkbox',
  onSuccess: (token) => {
    // User clicked and verified
  }
});

When to use

  • Login and registration forms
  • Payment pages
  • Forms requiring explicit user consent
  • When you need visual confirmation of protection

Invisible Mode

No visible widget. Verification happens in the background when triggered. Best for seamless user experience.

javascript
const widget = gkCaptcha.render('container', {
  siteKey: 'your-site-key',
  mode: 'invisible',
  onSuccess: (token) => {
    // Verification complete, submit form
    submitForm(token);
  }
});

// Trigger verification programmatically
document.getElementById('submit-btn').addEventListener('click', () => {
  widget.execute();
});

When to use

  • Contact forms
  • Comment sections
  • Search boxes
  • When UX is priority over visibility

Note: In invisible mode, if the risk score is high, a challenge may still appear to the user.

Auto Mode

Let gkCAPTCHA choose the best mode based on the user's risk score. Low-risk users get invisible verification, higher-risk users see the checkbox.

javascript
gkCaptcha.render('container', {
  siteKey: 'your-site-key',
  mode: 'auto',
  onSuccess: (token) => {
    // Widget chose the best mode based on risk score
  }
});

How it works

  1. Initial risk assessment runs in background
  2. If score < 0.3: Invisible verification
  3. If score 0.3-0.6: Checkbox appears
  4. If score > 0.6: Additional challenge may appear

Mode Comparison

ModeUser FrictionSecurityUse Case
checkboxMediumHighLogin, payments
invisibleLowMediumContact forms
autoAdaptiveAdaptiveGeneral purpose