Image Lens
An interactive magnifying lens with smooth spring cursor tracking, customizable zoom levels, blur physics, and optional textual overlay.
Live preview
Interact with the effect here. Drag, hover, and use its controls.
Variation Tweaking
Adjust the options and see the preview update live.
Installation
Install automatically via CLI or manually integrate dependencies and code.
Usage
Import the component and configure visual variants, sizes, and operational states.
import { ImageLens } from '@/components/ui/image-lens' <ImageLens src="/assets/images/cj1.jpg" alt="CJ San Andreas" zoom={2.2} blur={4} speed={0.15} text="CJ"/>Composition
Compose with icons, form triggers, and layout containers.
<div className="aspect-[4/3] w-full max-w-2xl overflow-hidden rounded-3xl border border-border"> <ImageLens src="/assets/images/cj1.jpg" alt="CJ" zoom={2.2} blur={4} text="CJ" /></div>API Reference
Property matrix, types, defaults, and usage descriptions.
Data Attributes
State-reflecting DOM attributes for custom selector styling.
This component does not expose custom data attributes. Standard HTML data attributes are forwarded to its interactive element.
How It Works
A circular focal lens tracks pointer movement with damped spring physics. The underlying image is magnified proportionally through CSS transforms and background positioning, while surrounding content receives configurable Gaussian blur.
Accessibility
Focusable viewport with descriptive image alt text, keyboard inspection support, and reduced-motion fallback.
Limitations
Features
Meet the team behind the interaction
Crafted for modern web applications and AI agent workflows.
