Features
- Click to toggle between zoomed and normal states
- Smooth zoom transitions
- Touch-friendly for mobile devices
- High-resolution image support
- Customizable scale and zoom behavior
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 zoomed.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.