Skip to content
animorio
IT
Back to the library

Wedding photo line

Physics, ImagesGSAP, CSS onlyAdvancedCompressed weight: Demo 13 KBGSAP 28 KBFreeDownload the zip

The wedding proofs of Ines Calder Photography, a made-up photographer: six real prints (CC0 photos) hung on a twine line with wooden pegs. The line is a real physical rope sagging between two brass nails and swaying gently in the room's air; the passing pointer blows on the prints, which swing each with its own weight, touch and settle. Clicked, a print leaves its peg and lands large in the middle with its shadow and title; clicked again it goes back up and the peg snaps shut.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React tab holds the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Wedding photo line" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Wedding prints hung on a line with wooden pegs</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the proofs wall of Ines Calder, a made-up wedding photographer: six real prints hang from a twine line with
       wooden pegs. The line is a real rope of springs: it sways a little in the room's air, the passing pointer
       blows on the prints like a breath, each one swings with its own weight and settles. Click a print and it leaves
       its peg and lands, larger, in the middle; click again and it goes back up -->
  <main class="palco" data-palco>
    <header class="testa">
      <p class="marchio">
        <svg class="marchio__segno" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="8.2" /><circle cx="12" cy="12" r="3.4" /><path d="M12 3.8v4.8" /></svg>
        <span>Ines Calder</span><span class="marchio__tenue">Photography</span>
      </p>
      <p class="testa__destra">Proofs, <span class="accento">Ada &amp; Theo</span></p>
    </header>

    <div class="banco" data-banco>
      <svg class="corde" data-corde aria-hidden="true">
        <defs>
          <filter id="sfuma" x="-5%" y="-50%" width="110%" height="200%"><feGaussianBlur stdDeviation="2.2" /></filter>
        </defs>
        <g data-ombre-corde></g>
        <g data-corde-vere></g>
      </svg>

      <div class="ombre" data-ombre aria-hidden="true"></div>

      <div class="stampe" data-stampe>
        <button class="stampa" data-stampa data-forma="p" data-titolo="The bouquet, waiting on a chair" data-luogo="The bridal suite, 10:20" aria-label="Open the print: The bouquet, waiting on a chair">
          <span class="stampa__carta"><span class="stampa__foto"><img src="fiori.webp" alt="A wedding bouquet of white roses and gypsophila tied with lace, resting on a wooden chair" width="960" height="1440"></span><i class="stampa__luce"></i></span>
        </button>
        <button class="stampa" data-stampa data-forma="l" data-titolo="The rings, on the veil" data-luogo="Villa Ortensia, 11:40" aria-label="Open the print: The rings, on the veil">
          <span class="stampa__carta"><span class="stampa__foto"><img src="anelli.webp" alt="Two wedding rings resting on a pale blue tulle veil" width="960" height="1200"></span><i class="stampa__luce"></i></span>
        </button>
        <button class="stampa" data-stampa data-forma="p" data-titolo="Hands, after the vows" data-luogo="The chapel, 13:05" aria-label="Open the print: Hands, after the vows">
          <span class="stampa__carta"><span class="stampa__foto"><img src="mani.webp" alt="The bride's hands folded on her white dress, a ring on her finger" width="960" height="1438"></span><i class="stampa__luce"></i></span>
        </button>
        <button class="stampa" data-stampa data-forma="l" data-titolo="Place cards for sixty" data-luogo="The lemon terrace, 16:30" aria-label="Open the print: Place cards for sixty">
          <span class="stampa__carta"><span class="stampa__foto"><img src="tavola.webp" alt="A table set with white linen, cutlery and a pine cone holding a card that reads Bride" width="960" height="548"></span><i class="stampa__luce"></i></span>
        </button>
        <button class="stampa" data-stampa data-forma="p" data-titolo="The two of them, at the water" data-luogo="The lake shore, 19:40" aria-label="Open the print: The two of them, at the water">
          <span class="stampa__carta"><span class="stampa__foto"><img src="spalle.webp" alt="The couple seen from behind, sitting in the grass by the lake at sunset" width="960" height="640" style="object-position: 64% 50%"></span><i class="stampa__luce"></i></span>
        </button>
        <button class="stampa" data-stampa data-forma="l" data-titolo="The lake, the morning after" data-luogo="From the boathouse, 07:15" aria-label="Open the print: The lake, the morning after">
          <span class="stampa__carta"><span class="stampa__foto"><img src="lago.webp" alt="A still lake at dawn with a long wooden pier" width="960" height="640"></span><i class="stampa__luce"></i></span>
        </button>
      </div>

      <div class="mollette" data-mollette aria-hidden="true"></div>

      <div class="velo" data-velo aria-hidden="true"></div>
      <p class="didascalia" data-didascalia aria-live="polite"><span class="didascalia__titolo" data-d-titolo></span><span class="didascalia__luogo" data-d-luogo></span></p>
    </div>

    <footer class="piede">
      <p>Lake Orta, June 2026. <span class="piede__tenue">Six of 412 proofs</span></p>
      <p class="piede__aiuto">Click a print to look closer</p>
    </footer>

    <svg class="fantasma" data-fantasma viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z" /></svg>
  </main>

  <!-- the peg, drawn once and reused: two wooden jaws, the notch that holds the line, the steel spring -->
  <svg width="0" height="0" style="position:absolute" aria-hidden="true">
    <defs>
      <linearGradient id="legno" x1="0" y1="0" x2="1" y2="0">
        <stop offset="0" stop-color="#c79c68" />
        <stop offset="0.35" stop-color="#e2c398" />
        <stop offset="0.7" stop-color="#d3ad7c" />
        <stop offset="1" stop-color="#a97d4c" />
      </linearGradient>
      <radialGradient id="ottone" cx="0.36" cy="0.32" r="0.75">
        <stop offset="0" stop-color="#fbeac2" />
        <stop offset="0.45" stop-color="#c89b55" />
        <stop offset="1" stop-color="#7c5a2c" />
      </radialGradient>
      <linearGradient id="acciaio" x1="0" y1="0" x2="0" y2="1">
        <stop offset="0" stop-color="#f4f3ef" />
        <stop offset="0.5" stop-color="#9a9a96" />
        <stop offset="1" stop-color="#5d5d5a" />
      </linearGradient>
    </defs>
  </svg>
  <template data-molletta>
    <svg class="molletta__disegno" viewBox="0 0 20 60">
      <g class="molletta__mascella" data-mascella="s">
        <path d="M9.4 0.6 H3.6 Q2 0.6 2 2.4 V11 Q4.4 13.6 2 16.2 V57.4 Q2 59.4 4 59.4 H9.4 Z" fill="url(#legno)" />
        <path d="M4 4 V10.5 M4.2 20 V56 M6.6 3 V9 M6.8 22 V50" stroke="#a87b49" stroke-opacity="0.35" stroke-width="0.5" fill="none" />
      </g>
      <g class="molletta__mascella" data-mascella="d">
        <path d="M10.6 0.6 H16.4 Q18 0.6 18 2.4 V11 Q15.6 13.6 18 16.2 V57.4 Q18 59.4 16 59.4 H10.6 Z" fill="url(#legno)" />
        <path d="M16 4 V10.5 M15.8 20 V56 M13.4 3 V9 M13.2 24 V52" stroke="#a87b49" stroke-opacity="0.35" stroke-width="0.5" fill="none" />
      </g>
      <path d="M10 0.6 V59.4" stroke="#7a5532" stroke-opacity="0.55" stroke-width="0.7" />
      <g class="molletta__molla" fill="none" stroke="url(#acciaio)" stroke-width="1.3" stroke-linecap="round">
        <path d="M1.4 22.6 Q10 20.6 18.6 22.6" />
        <path d="M1.4 25 Q10 23 18.6 25" />
        <path d="M1.4 27.4 Q10 25.4 18.6 27.4" />
      </g>
      <path d="M2.6 2 V57" stroke="#fff6e6" stroke-opacity="0.55" stroke-width="0.6" />
    </svg>
  </template>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

23 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Wedding photo line” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a warm plaster wall, in the light of a window and with a fine grain, top left the name of a made-up wedding photographer, Ines Calder Photography, and on the right “Proofs, Ada & Theo”. A twisted twine line runs from one brass nail to the other, knotted at each nail with a loose end hanging, and sags in the middle. Six prints with the white border of photo paper hang from wooden pegs, each with its two jaws, the notch the twine runs through and the steel spring: the bouquet resting on a wooden chair, the rings on a pale blue tulle veil, the bride's hands with the ring, the “Bride” place card on a pine cone, the couple sitting from behind by the lake at sunset, the lake with its pier the morning after. They are real photos, with a breath of film grain and a sheen of light sliding over the paper as the print turns. The prints arrive one at a time: they drop into the peg, which snaps shut, and start to swing. The twine is a physical rope: it sways gently in the room's air, dips a little where a print weighs on it, and each print is a pendulum hanging from a moving point, tugging the line as it swings. The passing pointer blows: the nearby prints move with the air, swing each with its own weight, touch their neighbours and pass the push on, then calm down; the soft shadows on the wall stretch with the swing and the line has its shadow too. Click a print and the peg opens, the print leaves with a small arc and lands large in the middle, straight, with a deeper shadow; behind it the wall is veiled and below appear the title and the place with the time (“Hands, after the vows”, “The chapel, 13:05”). Meanwhile the empty peg closes and swings on its own, and the line, lighter, rises. Click again and the print goes back up, the peg takes it with a snap and it starts swinging again. A drawn pointer does it all by itself: it blows along the line slowly and then faster, opens a print, looks at it and puts it back.

How it works

A rope of springs

The line is made of 41 points (Verlet): each remembers where it was on the step before and gets its speed from that, gravity pulls it down and the room's air (SWAY, two slow sine waves changing along the line) pushes it sideways. After every step, fourteen rounds put every segment back to its length: the twine does not stretch. Its total length comes from SAG, how deep it should sag, through the parabola formula. The two nail points never move.

The prints have weight

The point of the line holding a peg has a larger mass (1 + WEIGHT): when the segments are put back to their length it moves less than the others, and the line makes a small corner where the print weighs. When the print leaves its weight drops to zero in a moment and the line rises by itself.

A pendulum on a moving point

Each print is a pendulum hanging from its point: the angle's acceleration is minus (g plus the point's vertical acceleration) times the sine, minus the point's horizontal acceleration times the cosine, all over the length, minus DAMPING times the speed. So when the line sways the prints follow it. The print in turn tugs the line, sideways as it accelerates and down as it swings round: both are felt.

The pointer's breath

The pointer's speed is measured between frames and fades by itself when it stops. Each print feels the air through a Gaussian bell around its centre: its speed along the arc tends to the air's, with the strength BLOW. The nearby points of the line are carried by the air too. Neighbouring prints on the same row, if they touch while coming together, swap their speed with a bounce of 0.4.

The print that leaves

A number p from 0 to 1 takes the print from its hanging place (worked out on every frame, so even while it swings) to the middle: position, width, height and rotation blend with p, plus a small arc (the sine of p times pi). Width and height really change, not through scale, so the photo stays sharp. LIFT decides how large it is in the middle. The peg opens its jaws (two rotations around the spring) and closes again with back.out.

Values to change

NameFileDefaultWhat it changes
SWAYscript.js1How much the room's air sways the line (0 = still air).
BLOWscript.js1How strongly the passing pointer blows on the prints.
WEIGHTscript.js2.6How heavy each print is on the line, compared to the twine.
SAGscript.js0.075How deep the line sags between its nails, as a share of the wall.
DAMPINGscript.js0.9How quickly a swinging print settles.
LIFTscript.js0.6How tall the open print is, as a share of the height.
GRAINscript.js0.3How much film grain lies on the photos.
HOLDscript.js1.2The seconds the autopilot waits before starting again.

Try them in the Playground

When to use it

For the portfolio of a wedding or event photographer, the proofs page where a couple picks their photos, the gallery of a party, a trip or an exhibition: when the photos should feel like real prints and the viewer should want to touch them. Swap the photos in the six img tags of the HTML (data-forma p or l for portrait or landscape, data-titolo and data-luogo for the caption); the colours are in :root.

On phones

The same physics at adapted sizes: below 620 pixels wide the prints go on two lines of three, one under the other, centred in the height; prints, pegs and twine are measured on width and height. A finger blows on the prints by passing over them, and a tap opens them.

With reduced motion

No movement: the line is already in place, the prints stay still and there is no air; a clicked print fades out and reappears large in the middle, with the veil and the caption fading in, and goes back the same way.

Pitfalls

  • If the open print grew through scale, the browser would draw it small and then stretch it and the photo would be blurred: width and height really change, on every frame.
  • The veil must cover the other prints but stay under the open one: the layers of prints, shadows and pegs have no z-index, otherwise they would become separate stacking contexts and the open print could not rise above the veil; the print stays on top until it is back.
  • The line point's acceleration, taken from the difference of speeds, is noisy: without a filter and a limit the prints would tremble. It is smoothed and kept within 5000 pixels per second squared.
  • The line starts already settled: six hundred physics steps run silently before it is shown, otherwise it would be seen falling from straight.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP 28 KB.

Testing

Tested on 5 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations