"Slider CAPTCHA" describes a whole family of challenges rather than one product. The usual parts are a background with a gap, a puzzle piece, and a track with a handle. The visitor drags the piece into the gap, or turns a disc, matches two shapes or lines up a slider. Sites like them because they are cheap to build, work well on phones and slot easily into a risk engine.
- A background with a cut-out and a separate piece
- A track with a handle and a label like "Slide to verify"
- Canvas or
<img> elements for the bg and the piece
- A rotate version with an inner disc inside an outer ring
- A click version asking you to "select the matching shape"
- Network responses delivering the challenge images and a session ID
| Variant |
What you do |
Main difficulty |
| Jigsaw slide |
Move the piece into the gap |
Finding the gap |
| Gap fill |
Drag a shape onto the hole that fits it |
Matching shapes |
| Rotate |
Turn the disc to the right angle |
Estimating the angle |
| Multi-slide |
Line up several sliders |
Several coordinates |
| Click-match |
Click two identical objects |
Detecting objects |
- The server creates a background, a piece and the correct offset, sometimes with a tolerance.
- The client draws the challenge and records the drag or the clicks.
- On submit it sends the offset, the angle or the click coordinates, often with the full path and timing attached.
- The server accepts answers within the tolerance and may also rate how human the path looks.
- A failure triggers a new challenge. A success returns a token or flags the session as verified.
- Take the original background and piece from the network response instead of a rescaled screenshot.
- Prepare them: grayscale, blur, then Canny or Sobel edges.
- Run
matchTemplate with TM_CCOEFF_NORMED. The best match gives the top-left corner of the gap.
- Turn that position into a slider distance, accounting for the piece's starting offset and any CSS scaling.
- Drag along an eased path: speed up, overshoot a little, come back, and add slight vertical wobble.
- Wait for the success state. On failure, take a new challenge and use a different path.
- Always calculate with the images' natural size, since resizing throws the coordinates off.
- Sometimes the gap is just a darker area rather than a jigsaw outline. Edge detection is a good fallback.
- The most common failure is a straight drag at constant speed.
- Some sliders only look at where you let go, others at the whole path. Plan for the strict kind.
- Rotate variants need angle estimation, such as feature matching or a trained model, not
matchTemplate.
- Budget your retries: a wrong answer usually kills the challenge on the spot.