---
title: Proof Of Work
description: A big title over a grid of work that flies in, or tumbles into view, as you scroll.
category: Scroll
tier: free
url: https://ui.dimaac.com/components/proof-of-work
registry: https://ui.dimaac.com/r/proof-of-work.json
---

# Proof Of Work

A showcase grid under a big heading. Each piece arrives as you scroll to it, in one of two ways: the picture flies up from below, tipped over and fading in, and settles upright (rise), or it sits under a solid tile that tumbles off down the page and away (fall). Pieces further along a row arrive a beat later, so a row lands left to right, and each caption fades in just behind its picture. The grid is plain CSS with any number of columns and any picture shape, one column on phones. It uses one ScrollTrigger timeline per piece, plays once or replays when you scroll back up, works on the page or inside any scrolling element through the scroller prop, measures again when fonts or pictures change the page, and leaves every picture in place for visitors who prefer reduced motion. Ported from the first DiMaac UI and merged with two YouTube builds, rebuilt without any site context.

## Install

With the shadcn CLI:

```bash
npx shadcn@latest add https://ui.dimaac.com/r/proof-of-work.json
pnpm dlx shadcn@latest add https://ui.dimaac.com/r/proof-of-work.json
bunx --bun shadcn@latest add https://ui.dimaac.com/r/proof-of-work.json
```

With the `@dimaac` namespace in components.json: `npx shadcn@latest add @dimaac/proof-of-work`

Dependencies:

```bash
pnpm add gsap @gsap/react
npm install gsap @gsap/react
```

By hand:

1. Install the packages it uses: gsap, @gsap/react.
2. Copy the component file below into components/dimaac/proof-of-work.tsx.
3. It's styled with Tailwind v4 classes. If that folder sits outside the places Tailwind scans, add it with @source in your CSS.
4. Import it with import { ProofOfWork } from "@/components/dimaac/proof-of-work". Give its parent a size: it fills it.

## Usage

```tsx
import { ProofOfWork } from "@/components/dimaac/proof-of-work";

<ProofOfWork works={works} />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `works` (required) | `ProofOfWorkItem[]` | - | The pieces, in reading order. |
| `title` | `string` | `"Proof of Work"` | The big heading above the grid. |
| `tagline` | `string` | - | A small line under the heading. Leave it out to hide it. |
| `titleAs` | `"h1" \| "h2" \| "h3"` | - | Which tag the heading uses. Pick h1 when this is the main title of the page. |
| `effect` | `"rise" \| "fall"` | `"rise"` | How a piece arrives: "rise" flies the picture up from below, "fall" drops a cover tile away from it. |
| `columns` | `number` | `2` | How many columns the grid has from tablet width up. It is always one column on a phone. |
| `aspectRatio` | `string` | `"4 / 5"` | The shape of every picture as a CSS aspect-ratio, e.g. "4 / 5", "1 / 1" or "16 / 10". |
| `rotation` | `number` | `50` | For "rise": how far each picture is tipped over before it settles, in degrees. The direction alternates. |
| `distance` | `number` | `500` | For "rise": how far below its place each picture starts, in pixels (a little less on phones). |
| `duration` | `number` | `1` | How long one arrival takes, in seconds. |
| `columnDelay` | `number` | `0.25` | Extra wait for each column after the first, in seconds, so a row arrives left to right. |
| `ease` | `string` | `"power2.inOut"` | The GSAP ease of the arrival. |
| `coverColor` | `string` | `"currentColor"` | For "fall": the colour of the cover tile. "currentColor" follows the text colour, so it works in light and dark. |
| `showNumbers` | `boolean` | `true` | Show a small running number next to each title. |
| `replay` | `boolean` | `false` | Play the arrival again, backwards, when you scroll back up past a piece. Off means it plays once. |
| `start` | `string` | - | When a piece arrives, as a ScrollTrigger start such as "top 85%". Leave it out for a good default per effect. |
| `scroller` | `string \| HTMLElement` | - | The scrolling element. Leave it out to use the page; give it a selector or an element for an inner scroller. |
| `className` | `string` | `""` | Extra classes for the outer box. Set a background and a text colour here. |
| `titleClassName` | `string` | `""` | Extra classes for the heading, e.g. a font family. |
| `imageClassName` | `string` | `""` | Extra classes for each picture box, e.g. a radius. |

## Credits

- Abstract Eye Close-Up: Kuba, Lummi (https://www.lummi.ai/photo/abstract-eye-close-up-uamae), Lummi License
- Avant-Garde Fashion Pose: Semihan Dosunmu, Lummi (https://www.lummi.ai/photo/avant-garde-fashion-pose-1yqoo), Lummi License
- Modern Architectural Design: rena, Lummi (https://www.lummi.ai/photo/modern-architectural-design-aozka), Lummi License
- Elegant Perfume Bottle: Dona Mara, Lummi (https://www.lummi.ai/photo/elegant-perfume-bottle-j5t5p), Lummi License
- Surreal 3D Planet Scene: Ricardo Matos, Lummi (https://www.lummi.ai/photo/surreal-3d-planet-scene-ofhhw), Lummi License
- Desert Wanderer: Beth Design Studio, Lummi (https://www.lummi.ai/photo/desert-wanderer-9puhu), Lummi License
- Vivid Portrait on Pink: Amino, Lummi (https://www.lummi.ai/photo/vivid-portrait-on-pink-oxbow), Lummi License
- Contemplative Silhouette against Modern Minimalist Architecture: Viri Gutiérrez, Lummi (https://www.lummi.ai/photo/contemplative-silhouette-against-modern-minimalist-architecture-1-haa), Lummi License
- Portrait Through Orange Frame: Bernardo Lickfold, Lummi (https://www.lummi.ai/photo/portrait-through-orange-frame-kld5i), Lummi License
- Elegant Perfume Bottles: Amino, Lummi (https://www.lummi.ai/photo/elegant-perfume-bottles-vnjg1), Lummi License
- Intricate Natural Texture: Nika, Lummi (https://www.lummi.ai/photo/intricate-natural-texture-buk3_), Lummi License
- Vibrant Cylindrical Arrangement: SHIHO, Lummi (https://www.lummi.ai/photo/vibrant-cylindrical-arrangement-pj9pp), Lummi License

## Source

### proof-of-work.tsx → `components/dimaac/proof-of-work.tsx`

```tsx
"use client";

import { useRef, type CSSProperties } from "react";
import { gsap } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
import { useGSAP } from "@gsap/react";

// A title with a grid of work under it. Each piece arrives as you scroll to it, and there are two
// ways it can arrive:
//   "rise"  the picture flies up from below, tipped over 50 degrees, and settles upright
//   "fall"  the picture sits under a solid tile, and the tile tumbles away down the page
// The grid is plain CSS, so it works with any number of columns. Only the arrival is animated, so
// with no JavaScript, or with reduced motion, every picture is simply there.

if (typeof window !== "undefined") gsap.registerPlugin(useGSAP, ScrollTrigger);

export type ProofOfWorkItem = {
  /** Address of the picture. */
  image: string;
  /** Alt text for the picture. Falls back to the title. */
  imageAlt?: string;
  /** The name of the piece, shown in capitals under the picture. */
  title: string;
  /** A short line under the title, such as the kind of work. */
  subtitle?: string;
};

export type ProofOfWorkProps = {
  /** The pieces, in reading order. */
  works: ProofOfWorkItem[];
  /** The big heading above the grid. */
  title?: string;
  /** A small line under the heading. Leave it out to hide it. */
  tagline?: string;
  /** Which tag the heading uses. Pick h1 when this is the main title of the page. */
  titleAs?: "h1" | "h2" | "h3";
  /** How a piece arrives: "rise" flies the picture up from below, "fall" drops a cover tile away from it. */
  effect?: "rise" | "fall";
  /** How many columns the grid has from tablet width up. It is always one column on a phone. */
  columns?: number;
  /** The shape of every picture as a CSS aspect-ratio, e.g. "4 / 5", "1 / 1" or "16 / 10". */
  aspectRatio?: string;
  /** For "rise": how far each picture is tipped over before it settles, in degrees. The direction alternates. */
  rotation?: number;
  /** For "rise": how far below its place each picture starts, in pixels (a little less on phones). */
  distance?: number;
  /** How long one arrival takes, in seconds. */
  duration?: number;
  /** Extra wait for each column after the first, in seconds, so a row arrives left to right. */
  columnDelay?: number;
  /** The GSAP ease of the arrival. */
  ease?: string;
  /** For "fall": the colour of the cover tile. "currentColor" follows the text colour, so it works in light and dark. */
  coverColor?: string;
  /** Show a small running number next to each title. */
  showNumbers?: boolean;
  /** Play the arrival again, backwards, when you scroll back up past a piece. Off means it plays once. */
  replay?: boolean;
  /** When a piece arrives, as a ScrollTrigger start such as "top 85%". Leave it out for a good default per effect. */
  start?: string;
  /** The scrolling element. Leave it out to use the page; give it a selector or an element for an inner scroller. */
  scroller?: string | HTMLElement;
  /** Extra classes for the outer box. Set a background and a text colour here. */
  className?: string;
  /** Extra classes for the heading, e.g. a font family. */
  titleClassName?: string;
  /** Extra classes for each picture box, e.g. a radius. */
  imageClassName?: string;
};

// The grid switches from one column to many at the same width as Tailwind's md: breakpoint
const WIDE_SCREEN = "(min-width: 768px)";

export function ProofOfWork({
  works,
  title = "Proof of Work",
  tagline,
  titleAs: Heading = "h2",
  effect = "rise",
  columns = 2,
  aspectRatio = "4 / 5",
  rotation = 50,
  distance = 500,
  duration = 1,
  columnDelay = 0.25,
  ease = "power2.inOut",
  coverColor = "currentColor",
  showNumbers = true,
  replay = false,
  start,
  scroller,
  className = "",
  titleClassName = "",
  imageClassName = "",
}: ProofOfWorkProps) {
  const rootRef = useRef<HTMLDivElement>(null);

  useGSAP(
    () => {
      const root = rootRef.current;
      if (!root) return;

      const mm = gsap.matchMedia();

      // Reduced motion adds nothing here: every picture stays where the page put it
      mm.add({ motion: "(prefers-reduced-motion: no-preference)", wide: WIDE_SCREEN }, (context) => {
        const { motion, wide } = context.conditions ?? {};
        if (!motion) return;

        const items = gsap.utils.toArray<HTMLElement>("[data-pow-item]", root);
        const columnCount = wide ? Math.max(1, Math.round(columns)) : 1;
        const trigger = start ?? (effect === "fall" ? "top 80%" : "top 88%");
        const scrollerBox = typeof scroller === "string" ? document.querySelector<HTMLElement>(scroller) : scroller;
        const viewHeight = () => scrollerBox?.clientHeight ?? window.innerHeight;
        // Phones are short, so the pictures start a little closer
        const rise = wide ? distance : distance * 0.7;

        items.forEach((item, index) => {
          const media = item.querySelector<HTMLElement>("[data-pow-media]");
          const cover = item.querySelector<HTMLElement>("[data-pow-cover]");
          const caption = item.querySelector<HTMLElement>("[data-pow-caption]");
          if (!media) return;

          // Each piece has its own timeline, started by its own ScrollTrigger. It plays once by default.
          const arrival = gsap.timeline({
            scrollTrigger: {
              trigger: item,
              scroller,
              start: trigger,
              once: !replay,
              toggleActions: "play none none reverse",
            },
          });
          // Pieces further along the row arrive a beat later
          const wait = (index % columnCount) * columnDelay;

          if (effect === "rise") {
            arrival.fromTo(
              media,
              { rotation: index % 2 === 0 ? -rotation : rotation, y: rise, opacity: 0, transformOrigin: "50% 50%" },
              { rotation: 0, y: 0, opacity: 1, duration, ease },
              wait,
            );
          } else if (cover) {
            // The tile is hidden by default so the page works without JavaScript. Show it now.
            gsap.set(cover, { autoAlpha: 1 });
            arrival.to(
              cover,
              {
                x: () => gsap.utils.random(-100, 100),
                // Far enough to leave the screen, but never past the bottom of this component
                y: () => {
                  const room = root.getBoundingClientRect().bottom - item.getBoundingClientRect().top;
                  return Math.min(viewHeight() * 2 + gsap.utils.random(0, 400), room + 80);
                },
                rotation: () => gsap.utils.random(-180, 180),
                // Near the bottom of the component the tile fades out, so it never gets cut off in view
                opacity: () => (root.getBoundingClientRect().bottom - item.getBoundingClientRect().top < viewHeight() * 2 ? 0 : 1),
                duration: duration * 1.35,
                ease: "power3.in",
              },
              wait,
            );
            arrival.set(cover, { autoAlpha: 0 });
          }

          if (caption) {
            arrival.fromTo(caption, { opacity: 0, y: 14 }, { opacity: 1, y: 0, duration: 0.7, ease: "power2.out" }, wait + duration * 0.45);
          }
        });

        // Fonts and pictures change the page height after the first measure, so measure again.
        // A short delay turns a burst of changes into one measure.
        let measure: gsap.core.Tween | undefined;
        const observer = new ResizeObserver(() => {
          measure?.kill();
          measure = gsap.delayedCall(0.2, () => ScrollTrigger.refresh());
        });
        observer.observe(root);

        return () => {
          measure?.kill();
          observer.disconnect();
        };
      });

      return () => mm.revert();
    },
    { scope: rootRef, dependencies: [works.length, effect, columns, rotation, distance, duration, columnDelay, ease, replay, start, scroller], revertOnUpdate: true },
  );

  return (
    <div
      ref={rootRef}
      className={`relative w-full overflow-clip px-[clamp(1rem,4vw,4rem)] pt-[clamp(3rem,8vw,6rem)] pb-[clamp(4rem,12vh,10rem)] ${className}`}
      style={{ "--pow-columns": Math.max(1, Math.round(columns)) } as CSSProperties}
    >
      <div className="mx-auto max-w-[1400px]">
        <header className="mb-[clamp(2.5rem,7vw,6rem)] text-center">
          <Heading className={`m-0 text-[clamp(2.75rem,13vw,11rem)] leading-[0.92] font-normal tracking-[-0.03em] ${titleClassName}`}>{title}</Heading>
          {tagline ? <p className="mt-5 text-[11px] tracking-[0.18em] uppercase opacity-60">{tagline}</p> : null}
        </header>

        <ul className="m-0 grid list-none grid-cols-1 gap-x-[clamp(1rem,3vw,3rem)] gap-y-[clamp(2.5rem,6vw,5rem)] p-0 md:grid-cols-[repeat(var(--pow-columns),minmax(0,1fr))]">
          {works.map((work, index) => (
            <li key={`${index}-${work.image}`} data-pow-item className="group relative isolate min-w-0" style={{ zIndex: works.length - index }}>
              <figure className="m-0">
                <div className="relative">
                  <div
                    data-pow-media
                    className={`relative overflow-hidden ${imageClassName}`}
                    style={{ aspectRatio, backgroundColor: "color-mix(in srgb, currentColor 10%, transparent)", willChange: "transform, opacity" }}
                  >
                    <img
                      src={work.image}
                      alt={work.imageAlt ?? work.title}
                      loading="lazy"
                      decoding="async"
                      draggable={false}
                      className="block h-full w-full object-cover transition-transform duration-[900ms] ease-out group-hover:scale-[1.04] motion-reduce:transition-none"
                    />
                  </div>
                  {/* The cover sits outside the clipped picture box, so it can tumble out of it */}
                  {effect === "fall" ? <div data-pow-cover aria-hidden="true" className={`invisible absolute inset-0 z-[2] ${imageClassName}`} style={{ backgroundColor: coverColor, willChange: "transform" }} /> : null}
                </div>
                <figcaption data-pow-caption className="mt-3 flex items-baseline justify-between gap-4">
                  <span className="min-w-0">
                    <span className="block text-[13px] font-semibold tracking-[0.04em] uppercase">{work.title}</span>
                    {work.subtitle ? <span className="mt-1 block text-[13px] opacity-65">{work.subtitle}</span> : null}
                  </span>
                  {showNumbers ? (
                    <span aria-hidden="true" className="text-[11px] tabular-nums opacity-45">
                      {String(index + 1).padStart(2, "0")}
                    </span>
                  ) : null}
                </figcaption>
              </figure>
            </li>
          ))}
        </ul>
      </div>
    </div>
  );
}
```

### demo.tsx (the demo on the page, not installed)

```tsx
"use client";

import { ProofOfWork, type ProofOfWorkItem, type ProofOfWorkProps } from "@/components/dimaac/proof-of-work";

// Twelve photos in a grid. The page is paper in the light theme and ink in the dark one,
// and the heading, the captions and the "fall" tile all follow the text colour.

const works: ProofOfWorkItem[] = [
  { image: "https://ui.dimaac.com/media/portraits/light-streaks-4x5.jpg", imageAlt: "Close-up of a face with blue eyes and colorful light streaks", title: "Light Streaks", subtitle: "Portrait series" },
  { image: "https://ui.dimaac.com/media/fashion/chunky-knit-4x5.jpg", imageAlt: "A model in a chunky knit sweater, ruffled pants and coral lace-up boots against a warm backdrop", title: "Chunky Knit", subtitle: "Editorial" },
  { image: "https://ui.dimaac.com/media/architecture/yellow-planes-4x5.jpg", imageAlt: "Minimalist architecture with yellow and beige walls under a clear blue sky", title: "Yellow Planes", subtitle: "Architecture" },
  { image: "https://ui.dimaac.com/media/objects/amber-perfume-4x5.jpg", imageAlt: "A glass perfume bottle with amber liquid against a green background with leaf shadows", title: "Amber No. 4", subtitle: "Product" },
  { image: "https://ui.dimaac.com/media/art/floating-spheres-4x5.jpg", imageAlt: "A textured grey sphere with small colourful spheres floating around it like planets", title: "Floating Spheres", subtitle: "3D study" },
  { image: "https://ui.dimaac.com/media/nature/desert-wanderer-4x5.jpg", imageAlt: "A person in a flowing garment walks across a desert under a golden sky", title: "Desert Wanderer", subtitle: "Travel" },
  { image: "https://ui.dimaac.com/media/portraits/lime-blazer-4x5.jpg", imageAlt: "A person with curly red hair in a lime green blazer against a bright pink background", title: "Lime Blazer", subtitle: "Portrait" },
  { image: "https://ui.dimaac.com/media/architecture/pastel-rooftop-4x5.jpg", imageAlt: "Pastel architecture with a purple wall, a pink building and a lone figure against a blue sky", title: "Pastel Rooftop", subtitle: "Architecture" },
  { image: "https://ui.dimaac.com/media/fashion/orange-ring-4x5.jpg", imageAlt: "A young man in a knit bucket hat framed through an orange circle", title: "Orange Ring", subtitle: "Editorial" },
  { image: "https://ui.dimaac.com/media/objects/blue-bottles-4x5.jpg", imageAlt: "Perfume bottles with blue liquid and metallic caps against a textured wall with white flowers", title: "Blue Hour", subtitle: "Product" },
  { image: "https://ui.dimaac.com/media/nature/coral-texture-4x5.jpg", imageAlt: "An abstract close-up of reddish-brown and white patterns that look like a network of veins", title: "Coral Texture", subtitle: "Abstract" },
  { image: "https://ui.dimaac.com/media/art/colour-cylinders-4x5.jpg", imageAlt: "Colourful cylinders on a bold geometric background in orange, red, blue and green", title: "Colour Cylinders", subtitle: "Set design" },
];

export default function Demo(props: Partial<ProofOfWorkProps>) {
  const { works: _works, className = "", ...settings } = props;
  return (
    <div className="min-h-dvh w-full font-[family-name:Inter,system-ui,sans-serif] bg-[#f4f2ee] text-[#1a1a1a] dark:bg-[#0e0d0c] dark:text-[#ece7df]">
      <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Inter:wght@400;600&display=swap" precedence="default" />

      <ProofOfWork
        works={works}
        title="Proof of Work"
        tagline="Scroll to explore"
        titleClassName="font-[family-name:'Instrument_Serif',Georgia,serif]"
        {...settings}
        className={className}
      />

      <div aria-hidden="true" className="h-12" />
    </div>
  );
}
```

## Agent prompt

```text
Add the Proof Of Work component (<ProofOfWork />) from DiMaac UI to this project.

Docs: https://ui.dimaac.com/components/proof-of-work
Source and dependencies (shadcn registry JSON): https://ui.dimaac.com/r/proof-of-work.json

Install it with:
npx shadcn@latest add https://ui.dimaac.com/r/proof-of-work.json

Then use it like this:
import { ProofOfWork } from "@/components/dimaac/proof-of-work";
<ProofOfWork works={works} />

If the shadcn CLI isn't set up here, fetch the registry JSON above, write files[0].content to components/dimaac/proof-of-work.tsx and install gsap, @gsap/react.
It uses Tailwind v4 classes, so make sure Tailwind scans that folder. Give its parent a size: it fills it. Keep light and dark mode working and keep its prefers-reduced-motion fallback.
Full index for agents: https://ui.dimaac.com/llms.txt
```
