Media & Gallery Snippets — Free HTML CSS JS Galleries, Lightboxes & Players
54 media components · Image Galleries, Lightboxes, Zoom & Magnifiers, Before/After Sliders, Audio & Video Players, 3D Model Viewers · Exports to React, Vue, Angular & Tailwind
What's included
Features
About this category
Media & Gallery Snippets — Free Image Galleries, Lightboxes, Players & 3D Viewers
Media components are how people look at, listen to, and inspect content: a photo gallery that opens into a lightbox, a product image you can zoom into, a before/after comparison, a podcast player with chapter markers, or a 3D model you can spin. This collection groups all of them in one place.
Every snippet is plain HTML, CSS, and JavaScript. Some use a focused library from a CDN — PhotoSwipe, GLightbox, Viewer.js, medium-zoom, Howler.js, Tone.js, Three.js, or Babylon.js — and say so in the snippet.
Galleries and lightboxes. Photo Gallery with Lightbox, Thumbnail Gallery, Filter Tabs Gallery, Bootstrap Masonry Image Gallery, Instagram Gallery Lightbox, PhotoSwipe Full-Screen Gallery with Captions, and GLightbox Mixed Media Lightbox cover browsing a set of images and opening one full screen.
Zoom, magnify, and inspect. Image Magnifier, Product Image Magnify Lens, medium-zoom Article Image Zoom, Pinch & Scroll Zoom Image Viewer, Panzoom Zoomable Floor Plan, Viewer.js Product Image Viewer, 360° Product Spin Viewer, and Image Hotspot with Tooltips let people look closer at a single image.
Comparison. Before/after image sliders — including a CSS-only version — and a Video Scrub Comparison Slider show two states of the same scene.
Audio and video. A custom video player, podcast player with speed and skip controls, episode chapters, audio players with playlists and visualizers, picture-in-picture, live captions, a voice memo recorder, Media Session controls, and playable synth pads and piano keys.
3D models. GLB model viewers with hotspots, lighting studios, exploded views, colour configurators, and wireframe toggles, plus Three.js and Babylon.js product viewers.
Real-world uses
Common Use Cases
Got questions?
Frequently Asked Questions
Not all of them. Several galleries, the magnifier, and the before/after sliders are plain JavaScript and CSS. Others use a focused library such as PhotoSwipe, GLightbox, Viewer.js, or medium-zoom, loaded from a CDN, when that library solves the problem better than hand-written code.
Replace the model URL in the snippet with the URL of your own .glb file. Host it on the same origin or a server that sends CORS headers, and keep file sizes small with compressed textures so the model loads quickly on mobile.
Yes, with the usual browser rules: playback with sound must start from a user gesture such as a tap, and iOS may use its own full-screen video player unless the video has the playsinline attribute.
Yes. Every snippet has a framework export. Library-based viewers initialise on mount and clean up on unmount, and media elements are referenced with a ref instead of a DOM query.
All 54 media & galleries snippets, A to Z
- 360° Product Spin Viewer
- Audio Frequency Equalizer Bars
- Audio Waveform Tone Visualizer
- Audio Waveform Visualizer
- Babylon.js Orbit Camera Showcase
- Babylon.js Spinning Product Viewer
- Before / After Slider
- Before/After Image Comparison Slider
- Before/After Image Slider — CSS Only Radio Steps (No JavaScript)
- Bootstrap Before/After Image Comparison Slider
- Bootstrap Image Lightbox Gallery Modal
- Bootstrap Masonry Image Gallery
- Canvas Audio Frequency Bars
- Custom Audio Player With Playlist
- Filter Tabs Gallery
- GLB AR-Style Pedestal Viewer
- GLB Exploded View Assembly Toggle
- GLB Hotspot Annotation Viewer
- GLB Lighting Studio Viewer
- GLB Product Color Configurator
- GLB Side-by-Side Model Comparison
- GLB Spin-to-Reveal Stats Viewer
- GLB Wireframe / Solid Toggle Viewer
- GLightbox Mixed Media Lightbox (Image, Video and HTML)
- Hover Expand Gallery
- Howler Audio Player + Visualizer
- Image Accordion
- Image Hotspot with Tooltips
- Image Magnifier
- Instagram Gallery Lightbox
- Interact.js Pinch-Zoom Image
- Live Caption Overlay
- Media Session API Controls
- medium-zoom Article Image Zoom with Hi-Res Swap
- Now Playing Mini Player
- Panzoom Zoomable Floor Plan with Room Focus
- PDF.js Viewer with Thumbnails, Zoom and Rotate
- Photo Gallery with Lightbox
- PhotoSwipe Full-Screen Gallery with Captions
- Picture-in-Picture Video Card
- Pinch & Scroll Zoom Image Viewer
- Podcast Episode Chapters
- Podcast Player with Speed & Skip Controls
- Product Image Magnify Lens
- Simple Tone Synth Pad
- Three.js Product Viewer
- Thumbnail Gallery
- Tone.js Synth Pad
- Video Modal
- Video Player
- Video Scrub Comparison Slider
- Viewer.js Product Image Viewer with Toolbar
- Virtual Piano Keyboard
- Voice Memo Recorder