Introducing Nyx UI v1.2.0

Image Scanner

A dynamic component that applies interactive scanning effects to images, supporting various scan patterns, directions, and customizable animations.

Scanning image
AUTO

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"
        scanDirection="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.
scanColorstring"emerald"Color theme of the scanning effect. (emerald, blue, purple, amber, red, cyan, pink)
scanTypestring"default"Type of scanning visual effect pattern. (default, grid, radar, pulse, wave, matrix)
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.
scanIntensitystring"medium"Intensity level of the scanning effect. (low, medium, high, extreme)
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).
triggerScanbooleanfalseExternally trigger the scanning effect.
disableClickToScanbooleanfalseDisable click-to-scan functionality.