Image Scanner

Interactive image scanning effect with configurable patterns, directions, and animations.

Scanning image
AUTO∞

Image Scanner sweeps a configurable scan line over any image to reveal, highlight, or distort it as the beam passes. Scan pattern, direction, and animation timing are all props, so the same component can read as a medical scanner, a retinal scan, or a loading effect. Built with Framer Motion and Tailwind CSS. Fits AI product screenshots, security themed dashboards, and loading states that need more character than a spinner.

Installation

Example

Click on the image to scan

Scan images automatically

NORMAL
Main Entrance

Building A - Floor 1

30 FPS
Main Entrance camera feed
AUTO∞

Main Entrance

2 min agonormal

Parking Garage

1 min agowarning

Server Room

3 min agocritical

Reception Area

30 sec agonormal

Usage

import { ImageScanner } from "@/components/ui/image-scanner";
export default function MyComponent() {
  return (
    <div className="w-full max-w-md mx-auto">
      <h1 className="text-2xl font-bold mb-8 text-center">Horizontal Scan</h1>
      <ImageScanner
        image="/path-to-image.png"
        scanType="radar"
        scanColor="emerald"
        autoScan={true}
        loop
      />
    </div>
  );
}

Props

Image Scanner

PropTypeDefaultDescription
imagestringundefinedURL or path to the image to be scanned.
altstring"Scanning image"Alternative text for the image.
scanSpeednumber2Speed of the scanning animation in seconds.
scanColor"emerald" | "blue" | "purple" | "amber" | "red" | "cyan" | "pink""emerald"Color theme of the scanning effect.
scanType"default" | "grid" | "radar" | "pulse" | "wave" | "matrix""default"Type of scanning visual effect pattern.
classNamestringundefinedAdditional CSS classes to apply to the container.
onScanComplete(results?: ScanResult[]) => voidundefinedCallback function triggered when scanning is complete.
autoScanbooleanfalseAutomatically start scanning when component mounts.
scanDelaynumber0Delay in seconds before starting the auto scan.
scanAtScrollbooleanfalseTrigger scan when component is scrolled into view.
showDataOverlaybooleantrueDisplay scanning data overlay with phase information.
showProgressbooleantrueShow progress bar during scanning.
scanIntensity"low" | "medium" | "high" | "extreme""medium"Intensity level of the scanning effect.
showScanResultsbooleantrueDisplay scan result indicators on the image.
loopbooleanfalseEnable continuous looping of the scanning effect.
scanResultsScanResult[]undefinedCustom scan results to display (auto-generated if not provided).
triggerScanbooleanundefinedExternally trigger the scanning effect.
disableClickToScanbooleanfalseDisable click-to-scan functionality.