βBack to Patterns
UI Patterns Learning App
π Pinch to Zoom Pattern
Allow users to zoom in and out of content using pinch gestures or mouse wheel, with smooth panning support.
π― Interactive Example
Use pinch gestures on mobile or mouse wheel on desktop to zoom. Drag to pan when zoomed in.
100%
How to Use
β’ Pinch with two fingers to zoom in/out (mobile)
β’ Use mouse wheel to zoom in/out (desktop)
β’ Drag to pan when zoomed in
β’ Use the zoom controls for precise control
β’ Click reset to return to original size
π» Code Example
JSX
Loading source code...
β¨ Key Features
β
Pinch Gestures
Natural zoom with two-finger pinch
β
Mouse Wheel Support
Zoom with mouse wheel on desktop
β
Pan & Drag
Move around when zoomed in
β
Zoom Limits
Prevent over-zooming or under-zooming
β
Smooth Animations
Fluid transitions and visual feedback
β
Reset Functionality
Return to original size and position
π― Use Cases
πΌοΈ
Image Viewers
Examine photos and images in detail
πΊοΈ
Maps & Charts
Navigate detailed maps and diagrams
π
Document Viewers
Read and examine documents closely