Image
Display images with built-in preview, fallback, and placeholder support.
When to Use
- For images that should support click-to-preview with zoom
- When you need fallback handling for broken images
- For image galleries with grouped preview navigation
Import
Examples
Basic
With Fallback
Display a fallback image when the source fails to load.
Preview Group
Group multiple images for batch preview navigation.
API
ImageProps
src—string— Image source URLalt—string— Alt textwidth—string | number— Image widthheight—string | number— Image heightpreview—boolean | PreviewConfig— Enable preview (default:true)fallback—string— Fallback image URL on errorplaceholder—ReactNode— Placeholder while loadingrootClassName—string— Root element CSS class
PreviewConfig
visible—boolean— Controlled preview visibilityonVisibleChange—(visible: boolean) => void— Visibility callbackscaleStep—number— Zoom step sizeminScale—number— Minimum zoom levelmaxScale—number— Maximum zoom level
Image.PreviewGroup Props
preview—boolean | GroupPreviewConfig— Group preview configitems—string[]— Image URLs for the group