SVG & Animations

Interaction studies from cherry-nft/animation-collection — hairline SVG lab, Bencho blocks, and Libraries.dev effects

Source & attribution

Ported from the private asset pack (PROMPT.md + verified hairline replica + Bencho SPECs). Hairline ships as six React demo components (Riffle → Turntable), not an iframe. After Lucas Marques / Bencho / libraries.dev — no hotlinked originals.

Hairline

SVG · springs · 6 demos

Each figure is a standalone React demo component under components/demos/hairline/, ported from the verified replica (not an iframe). Shared engine + per-figure init; IntersectionObserver pauses offscreen; prefers-reduced-motion honored.

Six figures drawn in hairline, after lucasmarkes.com/lab/hairline. Each figure is its own React demo component, ported from the verified replica in animation-collection/hairline/.

Full lab (static)

Riffle

Fig 9.1

A tray of cards, one for each experiment in this lab. The card under the pointer stands up, and its neighbours lean away from it one after another. The delay counts outwards from the pointer, so the motion spreads from where you are and doesn't run down a list. The part you can't see is what makes it calm: the hit areas are fixed bands that never move, so a card that lifts can't slide out from under the pointer and drop the hover. Turn on “hit bands” to see them.

40ms

Terrain

Fig 9.2

Eighty-one pillars on a plinth. The pointer is projected back onto the ground, and each pillar takes its height from its distance to that point. Every pillar has its own spring, because the target moves on every frame and a timed ease would always be chasing it. At rest the field is a dune with two rises. A flat floor would be an empty thumbnail.

3.00 cells

Exploded

Fig 9.3

An app window taken apart into its layers. Moving across opens the gap; moving down picks a layer. The picked layer gets a bright edge, and that edge is the whole callout: its name goes to the corner, outside the drawing. The dashed guides are painted between the layers, so a plate hides the lines behind it the way a real one would.

28 u

Phosphor

Fig 9.4

A dot matrix that plays a loop until you touch it. Then the pointer paints, and what you paint fades like phosphor. The loop returns a moment after you leave. It runs only while it is on screen, and so does every other figure here: they share one frame loop, and it stops when all of them have settled.

520ms

Slow

Fig 9.5

Crates ride a belt through a gate. Hovering doesn't pause them. It springs the clock down to a fifth of its speed, so everything keeps moving, just slowly enough to read the code on a lid. Stopping the world would be easier to build, and it would look like a bug.

0.20×

Turntable

Fig 9.6

Linear's camera never moves. Here it's the thing you control. Flick across the platter and it spins with the speed of your hand, friction bleeds that off, and a spring seats it in the nearest quarter turn, so it always stops at the angle it was drawn for. The hard part was order: which block is in front changes all the way round, and it is worked out again on every frame.

650ms

Image compare

Drag · Bencho

Jelly divider (stiffness 620 / damping 44), flick-to-fling, ARIA slider, Before/After tags. Spec from image-compare/SPEC.md. Local matched before/after pair — no hotlinking.

bencho.dev/blocks/image-compare
BeforeAfter

Drag the knob, flick to fling, or use ← → (10% steps). Sound is omitted (spec default off).

Generate

Press · Bencho

Photo "develops" via SVG turbulence + displacement + blur + contrast pivoting around PAPER=0.9. Spec from generate-block/SPEC.md. Local flower asset.

bencho.dev/blocks/generate
0%

Press Generate. After done, hover the card to regenerate. Reduced motion → 400ms fade, no filter layer.

Libraries.dev effects

npm

Part 4 of the animation-collection prompt: border-beam@1.4.1, thinking-orbs@0.3.2, voice-glow@0.2.1. Already mounted with live demos on the Libraries.dev page.

Open Libraries.dev demos