Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Dual Scroll Gallery Block for React

A tall framed window beside the copy where two columns of drawn leather goods scroll in opposite directions, with faded ends, a visible Pause and three facts about the workshop at the foot of the copy.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A parallax-style gallery for React with Base UI, for Tanyard, a leather-goods label. At the end of a split divider, a tall window (+ marks on its corners) holds two columns of drawn leather goods (a tote, a wallet, a belt and a boot, at mixed heights) scrolling in opposite directions, one down and one up, their ends fading out. At the start of the divider: a compact header, a visible Pause button and, at the foot, three facts about the workshop (14 hours, 6 weeks, 10 years). On a phone the window sits under the header and the facts follow it. Each piece shows its name as a link and a note on its leather. Hovering a column, or focusing a name in it, holds that column; under reduced motion nothing moves, the Pause button goes away and each column scrolls by hand. The pictures are drawn, not photographed. It's built from Marquee (vertical), Button and Guides, with your theme's tokens for every colour. The label and its numbers are made up for the example.

FAQ

How does a visitor stop the columns?

The Pause scrolling button under the header stops both and keeps aria-pressed, with a play icon while paused. Hovering a column or focusing a name in it holds just that column. Under reduced motion the animation never starts and the button is hidden.

How does the vertical marquee keep whole rows?

Each column is a vertical Marquee that fills the window's height and repeats its pieces until it does, so the loop never shows a gap. The repeated copies are hidden from screen readers and inert, which keeps them out of the tab order.

Why do the pictures have different heights?

Each piece has its own ratio (four by five, square, five by four, three by four) so the two columns drift against each other and never line up. The drawing is scaled to the picture's shape; give your photograph the same ratio and it fits the same way.

What changes on a phone?

The window goes under the header and keeps its height, so the pictures start inside the first screen, and the three facts follow it, one per row. The divider only draws from the large breakpoint; below it a single rule with + marks separates the parts.

How do I use my own photographs?

Each piece in FIRST_COLUMN and SECOND_COLUMN has a name, a leather note, a ratio and a description. Add your image's address to it and replace the Scene in piece() with <img alt="" className="size-full object-cover" src={…} />. The comment above Scene says where.

Does it work right to left?

Yes. The split mirrors, the divider moves to the other side of the window, and the facts keep their numbers in reading order. The drawn pictures are not mirrored.

  • Pro

    Two rows of drawn prints moving in opposite directions under a centred header, landscapes in one and tall portrait prints in the other, with faded ends, titles that link, a visible Pause and hand scrolling under reduced motion.

  • Pro

    Ken Burns Slideshow Gallery

    Carousels and slides

    A framed viewer that runs rail to rail with five drawn stills, each panning and zooming slowly for seven seconds before crossfading to the next, with a caption, segments that fill with the time, Previous, Next and a visible Pause.

  • Pro

    Product Showcase Gallery

    Stage and thumbnails

    A product viewer for a running shoe: a vertical rail of four angles beside a 4:3 stage, three finishes that recolour every picture, and price, sizes and stock with an Add to bag button.

  • Pro

    Dual Row Marquee Logos

    Multi-row marquees

    Two rows of customer wordmarks for a camera-security service, scrolling in opposite directions at one calm speed under a centred header, with a button that pauses both.

  • Pro

    A features section for a realtime sync engine: a thin icon rail of six streams and a panel with the stream's name at display size beside a vertical marquee of its sync events, with a visible Pause button.

  • Pro

    Five picture strips in a framed row where one is wide and the rest are slivers, each a button that opens it and reveals a solid caption, with arrow keys; rows that grow in height on a phone.