Homecomponentsinformational

MediaPreview

A modal dialog that displays media slideshow.


Use MediaPreview to overlay media previews on the current page in a modal dialog.

Displayed Media

Use currentIndex to set the media that should be previewed when opened.

Sidebar

Use sidebar to set the sidebar data.

Unoptimized images

Use the unoptimized property to disable Next.js image optimization.

API

medias
Required
A set of media elements.
Media[]

open
Opens preview if true.
true
false

onClose
Callback that executes when preview closes.
(() => void)

trigger
An optional trigger that opens the preview.
ReactNode

currentIndex
The index of the currently previewed media.
number

unoptimized
Disable next/image optimization.
true
false

sidebar
Sidebar properties.
{ title: string; content: ReactNode; }