Skip to content

pastetaste

Drift Columns

MediaSectionsAnimation

A masonry wall of photo tiles whose columns slide along their own lines as the page scrolls, so the wall shears; tiles keep their proportions, show a caption and arrow on hover, and one column can hold a pitch block.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/drift-columns.tsx.

npx shadcn@latest add https://pastetaste.com/r/drift-columns.json

Prompt

Install the pastetaste component "Drift Columns" (drift-columns) into this Next.js project and use it.

What it is: A masonry wall of photo tiles whose columns slide along their own lines as the page scrolls, so the wall shears; tiles keep their proportions, show a caption and arrow on hover, and one column can hold a pitch block.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/drift-columns.json
   (it writes components/pastetaste/drift-columns.tsx; install any npm packages it reports).
2. Import it: import { DriftColumns } from "@/components/pastetaste/drift-columns" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- tiles: DriftTile[] = 15 city photos — Photo, label, ratio (height over width) and optional href or onSelect.
- columns: number = 5 — Columns on wide screens; tiles are dealt out in turn.
- speeds: number[] = [1, 0.4, 1.3, 0.6, 1] — Drift speed per column; negative runs the other way.
- amplitude: number = 90 — Travel in px at speed 1.
- centre / centreColumn: ReactNode / number = pitch block / 2 — Block at the top of one column.
- heading: ReactNode = Discover who rides your lift — Centred heading above the wall.
- background / className / style: string / string / CSSProperties — Section background and the outer element.

Live preview: https://pastetaste.com/c/drift-columns
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 7

PropTypeDefaultDescription
tilesDriftTile[]15 city photosPhoto, label, ratio (height over width) and optional href or onSelect.
columnsnumber5Columns on wide screens; tiles are dealt out in turn.
speedsnumber[][1, 0.4, 1.3, 0.6, 1]Drift speed per column; negative runs the other way.
amplitudenumber90Travel in px at speed 1.
centre / centreColumnReactNode / numberpitch block / 2Block at the top of one column.
headingReactNodeDiscover who rides your liftCentred heading above the wall.
background / className / stylestring / string / CSSProperties-Section background and the outer element.
View all →