ZoomImageHoverOptions type defines the configuration options for creating a hover-based zoom interface that displays a magnified view in a separate zoom target area.
Type Definition
Properties
The dimensions of the zoom target area where the magnified image will be displayed.Example:
URL of a higher resolution image to use for the zoomed view. If not provided, uses the source image.This is useful when you want to display a smaller image for performance but show a high-resolution version on zoom.Example:
CSS class name(s) to apply to the zoom lens element. The zoom lens is the overlay that appears on the source image to indicate the zoomed area.If not provided, a default semi-transparent purple background (
rgba(238, 130, 238, 0.5)) is applied.Example:Scale factor for the zoom lens size. Values greater than 1 make the lens larger, values less than 1 make it smaller.Example:
The HTML element where the zoomed image will be displayed. This is typically a separate container positioned next to or below the source image.Example:
CSS class name(s) to apply to the zoom target element when zoom is active. Useful for adding visual effects like borders or shadows.Example:
The magnification level for the zoomed image. A value of 2 means the zoomed image is displayed at 2x the original size.Example:
Whether to disable automatic scroll locking when zoom is active. By default, scrolling is locked to prevent accidental page scrolling during zoom interaction.Example:
Additional HTML attributes to apply to the zoomed image element.Properties:
alt?: string- Alternative text for accessibility
Related Types
ZoomImageHoverState
The internal state managed by the hover zoom component:ZoomImageHoverStateUpdate
State updates that can be applied:ZoomedImgStatus
Usage Example
Common Use Cases
E-commerce Product Images
Image Gallery
See Also
- createZoomImageHover - Function that uses these options
- ZoomImageWheelOptions - Options for wheel-based zoom
- ZoomImageMoveOptions - Options for move-based zoom
- ZoomImageClickOptions - Options for click-based zoom