ImagePreview component is used for full-screen image preview, supporting gesture zoom, swipe switching and more.
Navigation icons are shown by default for switching images. Use showNavigation prop to hide them, and navigationPosition prop to set position:
center (default): Vertically centeredbottom: Bottom positionThe images prop supports two formats:
String array (image URLs)
const images = ['/image1.jpg', '/image2.jpg'];
Object array (with more info)
const images = [
{ url: '/image1.jpg', alt: 'Image description 1' },
{ url: '/image2.jpg', alt: 'Image description 2', thumbnail: '/thumb1.jpg' }
];
number: Number indicator, shows current index and totaldot: Dot indicatornull: Hide indicatorUse children Snippet to customize the content area below the image, commonly used for image descriptions, action buttons, etc.
closable={true}maskClosable={true} (disabled by default)ImageList component