Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultGallery & imagesDraggable Brick Grid
Pill Reveal FooterBrowse all 182Scaling Row Slider
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Draggable Brick Grid

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • Flip

Setup

npm i gsapregisterPlugin(Flip)

More like this

  • Card
  • Grid
  • Expand
  • Infinite loop
  • Flip

Features.

  • A full-height sheet of portrait pages laid out like brickwork, every other row nudged sideways by one gap
  • The sheet repeats forever in every direction, and is always built a page bigger than the stage, so a wrap never shows
  • Drag anywhere to pan 1:1, scroll or swipe a trackpad to drift, or use the arrow keys to move one page at a time
  • The sheet eases after the pointer with the same lag at any frame rate
  • Pages squeeze to 0.95 while you hold, with a little overshoot when you let go
  • Click a page and its image flies into the middle at up to 80% of the screen height while the pages around it are flung outwards, spinning
  • Escape or a click anywhere folds it back; closing mid-flight snaps shut at once
  • A caption for each page rises in under the opened image
  • Follow, scroll speed, squeeze, open time and spin are options
  • Respects prefers-reduced-motion: no lag, squeeze or flight, everything jumps
  • GSAP with Flip

How to get it right.

Use portrait pages

Every page shows at 3:4 on the sheet (15em × 20em) and opens at up to 80% of the screen height. Export them about 700px wide or more so the opened page stays sharp.

Seven to ten images

The sheet is at least six pages wide and fills row by row, cycling through your images in order. A count that divides the row length (6 or 12 on most screens) stacks each picture down its own column, and under six the same picture sits close to itself. Seven to ten mix best; one image works, it just repeats.

Name each page

The caption under an opened page reads data-dpg-name on its source image. Keep it to one short line: it doesn't wrap.

Intro card is optional

It ships without one. To add it, put <header class="dpg_intro"> holding .dpg_title and .dpg_hint as the root's first child (React: title, hint).

Give it the whole stage

The stage takes every drag and wheel event over it and stops the page scrolling while the pointer is on it. Use it as a full-height section, not a strip in the middle of a long read.

Variations.

  • Default — follow 0.1, scroll speed 0.4, squeeze 0.95, 1s open, ±40° spin
  • Tight follow — data-au-follow="0.3": the sheet sticks closer to the pointer
  • Floaty — data-au-follow="0.04": a long, soft glide after you let go
  • Flat fling — data-au-spin="0": the pages slide away without turning
  • Bigger pages — --dpg-card-w: 20em; --dpg-card-h: 26.667em; --dpg-gap: 10em on .dpg_stage
  • Your colours — override the --dpg-* variables

Where it fits.

  • Sketchbooks and illustration archives — a sheet of studies to wander through
  • Photo series — a whole shoot on one endless contact sheet
  • Moodboards — a wall of references with a close look on click
  • Portfolio landing pages — a playful first screen before the case studies

Frequently asked.

Add another <img> to [data-dpg-sources] with its alt and data-dpg-name. The script builds the sheet from that list.

Yes. Drag with a finger to pan; a tap opens a page. At 767px and below any intro card spans the width and the opened page is at most 70% of the screen height.

Yes. Tab to the stage, use the arrow keys to move one page at a time, Enter or Space to open the page nearest the middle, and Escape to close.

No. Wheel and touch over the stage pan the sheet instead, so put a normal section above or below it to scroll on.

Yes. Every stage runs on its own. Escape closes whichever one is open.

Yes: gsap and Flip, loaded before the script.

Related components.

Pro

File Drawer Cards

Hover

Pro

Capsule Image Hero

Click

Pro

Depth Fly-Through Hero

Load