Desktop optimized

Please maximize your browser window or use a larger screen to explore the component library.

Go to home

Slinky Trail

An interconnected, continuous spring-physics mouse trail that simulates a slinky or snake chasing the pointer.

Last Modified:Aug 17, 2026

Install

CLI

slinky-trail
$pnpm dlx shadcn@latest add https://ui.satisium.com/r/slinky-trail.json

Or install a specific demo variant:

slinky-trail-avatars-demo
$pnpm dlx shadcn@latest add https://ui.satisium.com/r/slinky-trail-avatars-demo.json

Or install a specific demo variant:

slinky-trail-images-demo
$pnpm dlx shadcn@latest add https://ui.satisium.com/r/slinky-trail-images-demo.json

Manual

1. Add Source Code

Note: This component utilizes pure DOM manipulation and RequestAnimationFrame logic. No external libraries are required.

Performance Architecture

Unlike the other trails that spawn and recycle items based on a timeline, the Slinky Trail pre-allocates a continuous, fixed-length chain of nodes that are permanently active on screen.

As the pointer moves, "Node 0" calculates a spring-physics lerp to chase the pointer, "Node 1" calculates a spring to chase "Node 0", and so on. This creates an uninterrupted chain reaction calculated and rendered cleanly on the GPU at 60fps.

Props

PropTypeDefaultDescription
imageUrlsstring[][]Array of image URLs to render.
maxItemsnumber12Total number of cards in the continuous chain.
itemSizenumber110The base pixel size of the image cards.
stiffnessnumber0.3How tight the spring is. Lower = looser/longer snake, Higher = tighter/shorter snake
classNamestringundefinedStandard Tailwind classes for the fixed wrapper.
itemClassNamestring""Standard Tailwind classes applied to the individual image wrappers.