Skip to content

Bounce

Pro

Any node, or a trail of photos, moves in a line and bounces off the edges of its box. Each wall hit sets the next color, and a corner hit glows.

  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 11, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Bounce needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
18
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Put the children in a box with a size. Each child needs a key.

photo-bounce.tsx

Bounce

<div>
PropTypeDefaultDescription
gapnumber48The distance between trail items along the path, in px. Default 48.
speednumber120Speed along the path, in px per second. Default 120.
anglenumber45The start direction in degrees (0 is right, 90 is down). Default 45.
colorsreadonly string[]AURORA_COLORSThe colors that --bounce-color steps through, one per edge hit (any CSS color). A child that wants the color reads the variable (border-(--bounce-color)). Default: the aurora.
onCornerHit—Called when the leader hits a corner.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use one child for the classic bouncing badge, or many for a trail on one path.
  • Use --bounce-color in a child to take the color of the last wall hit.
  • Use onCornerHit to count or react to a corner hit.
  • For text or logos that scroll in a row, use a Marquee.
  • For a layer that moves with the scroll, use Parallax.
Corner hit
theme · the glow in the corner fades in and out
Drift
none · each frame writes one transform per item, at `speed` px a second
  1. AddedBounce.
Open the release