Gallery 04
A horizontal scrolling image strip that drifts continuously, pausing on hover, focus, or an explicit pause button.
Requirements
HTML, CSS, JavaScript
Dependencies
None
Usage
Copy index.html, styles.css and script.js into your project.
About Gallery 04
Gallery 04 is a gallery section in the Gallery Sections collection, available in HTML + CSS + JavaScript and React + TypeScript + Tailwind CSS. Last updated August 25, 2026.
- gallery
- marquee
- horizontal scroll
- drift
- pause control
- accessible
What the code includes
HTML + CSS + JavaScript
3 files: index.html, styles.css, script.js
- Behavior is handled in script.js.
- ARIA in the markup: aria-label, aria-pressed.
- HTML elements used: section, figure, button, img, svg.
- Includes a prefers-reduced-motion rule for its animation.
- Responsive CSS breakpoints at 640px, 1024px.
- The demo imagery is loaded from Unsplash.
React + TypeScript + Tailwind CSS
3 files: Gallery04.jsx, Gallery04.types.ts, Gallery04.tailwind.css
- Typed data shapes: MarqueeImage.
- Uses React hooks: useState.
- ARIA in the markup: aria-label, aria-pressed.
- HTML elements used: section, figure, button, img, svg.
- Includes a prefers-reduced-motion rule for its animation.
- Responsive Tailwind breakpoints used: sm, lg.
- The demo imagery is loaded from Unsplash.