View Magnifier

January 2025

Loading...

A dynamic image magnifier component that creates an interactive zoom effect on hover. Features customizable magnification level, smooth transitions, and responsive behavior for enhanced image viewing experience.

Installation

npx shadcn@latest add "https://bucharitesh.in/r/view-magnifier"

Props

PropTypeDescriptionDefault
childrenReact.ReactNodeChildren to be magnified
classNamestringAdditional classes for the container
maxScalenumberMaximum scale of the magnifier1.8
onScaleChange(isActive: boolean) => voidCallback function when the scale changes
onMaxScaleReached(isAtMax: boolean) => voidCallback function when the maximum scale is reached

Examples

Loading...