Features
- Magnified view follows cursor movement
- Smooth panning across the entire image
- High-resolution image support
- Customizable scale and zoom behavior
- Works with both mouse and touch input
Vanilla JavaScript
- HTML
- JavaScript
React
Vue
Svelte
Angular
Next.js (App Router)
Key Configuration Options
zoomImageSource (Required)
Specifies the high-resolution image to display when zooming.scale
Sets the magnification level (default: 2).scaleFactor
Provides custom zoom calculation logic.zoomTarget
Optional target element for displaying the zoomed view. If not provided, the zoom appears over the source image.Styling
Container Styles
The container should haveoverflow: hidden to prevent the zoomed image from extending beyond boundaries.