Components Library Operations MediaLightboxPro

MediaLightboxPro

Dependency-free media proof gallery with modal viewing and wraparound navigation.

Live demo

01

Media viewer

Media lightbox pro

Implementation

02
MediaLightboxPro.svelte
<script lang="ts">
  import MediaLightboxPro from '$lib/components/MediaLightboxPro.svelte';
</script>
​
<MediaLightboxPro {items} />

MediaLightboxPro is a dependency-free proof gallery. It wraps thumbnails into a dialog with next/previous navigation and reusable index helpers for predictable media browsing.

Logic explainer

03

What Does It Do? (Plain English)

MediaLightboxPro renders a thumbnail gallery and modal viewer for screenshot or media proof. It is intentionally dependency-free so teams can copy it into component docs or QA dashboards.

How It Works (Pseudo-Code)

receive media items
render thumbnail grid
open selected item in dialog
previous/next controls wrap through items
show counter and caption

Props Reference

Prop Type Default Description
items MediaLightboxItem[] Required Media items with title, src, alt, and optional caption.
title string "Media lightbox pro" Heading above the gallery.

Dependencies

No external dependencies.

API

04
PropTypeDescription
itemsMediaLightboxItem[]Media rows with src, alt, title, and optional caption.
titlestringGallery heading.