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
VaultScrollDiamond Line Timeline
Tilting Panel MenuBrowse all 182Glow Band Sheet Modal
  • 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

Diamond Line Timeline

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
  • ScrollTrigger

Setup

npm i gsapregisterPlugin(ScrollTrigger)

More like this

  • Timeline
  • Reveal
  • Line drawing
  • ScrollTrigger
  • Parallax

Features.

  • Pictures scattered across a 16-column grid, one row each, with a line drawn down the middle as you scroll
  • The line eases down to the first year, then its end rides the middle of the screen
  • A diamond on the line's end turns seven times over the section and always comes to rest as a diamond
  • Each picture wipes open top to bottom while its image slides down into place, scrubbed to the scroll
  • Each year brightens as it crosses the middle, and dims again on the way back up
  • Hover a picture to inset its frame, dim the others and slide its title in; titles drift gently against the scroll
  • Phones stack the pictures at half width with the year beside them; crossing the middle scales a picture up and shows its title
  • Respects prefers-reduced-motion: pictures show at once, the diamond holds still and nothing drifts

How to get it right.

Place each picture on the grid

Every entry sets four custom properties inline: --dmt-row (its row), --dmt-start and --dmt-span (its columns of 16) and --dmt-ratio (its shape, e.g. 4 / 3). Its year row takes the same --dmt-row. Alternate sides and widths so the line has room to breathe between them.

Put the title on the open side

Titles float on the right by default. For a picture that ends near the right edge, set data-dmt-side="left" on its entry. The script narrows any title that would run off the screen.

Keep titles short

Three to six words read well beside a picture. They only show on hover on wide screens, so the picture and year must carry the story on their own.

Give it full width

The line runs down the centre of the section and title widths are measured against the screen. Put it at full width in normal page flow.

Leave room after it

The line finishes when the bottom of the section reaches the middle of the screen. Give the page something below it, or the last year never lights up.

Variations.

  • Still diamond — data-au-spin="0"
  • Fast spin — data-au-spin="14"
  • No title drift — data-au-parallax="0"
  • Light theme — --dmt-bg: #fffcf2; --dmt-fg: #252422; --dmt-surface: #e6e0d3; on the section
  • No heading — remove .dmt_head; the line then starts at the top of the grid

Where it fits.

  • About pages — a company's history, year by year
  • Brand stories — the origin of a product, a place or a family business
  • Portfolios — projects in the order they were made
  • Anniversaries — a look back over decades

Frequently asked.

As many as you like. Each one is a grid row, and the line and triggers are measured from the section, so adding or removing entries needs no script changes.

On wide screens they wait behind a mask until you hover the picture, which keeps the timeline calm. Phones show them as each picture crosses the middle.

No. It scrubs off the scroll position, so it works with native scrolling and with any smooth-scroll library that updates ScrollTrigger.

Yes. Override --dmt-bg, --dmt-fg, --dmt-surface and --dmt-accent on the section. --dmt-diamond sets the diamond's size and --dmt-dim how far the other pictures fade on hover.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll