REFERENCE
- Gallery page: https://magpui.com/en/i/liquid-merging-checkout-stepper-fc2c16
- First frame (image): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/liquid-merging-checkout-stepper-fc2c16/shot.jpg
- Clip (mp4): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/liquid-merging-checkout-stepper-fc2c16/clip.mp4
- Original post: https://x.com/kaolti/status/2119797138276471067 by @kaolti
Before building, download the first frame and look at it. If ffmpeg is available, download the clip and extract frames (ffmpeg -i clip.mp4 -vf fps=2 frame-%02d.png), then study the motion frame by frame. Match what you see; the text below describes it, the frames are the truth.
BUILD: A three-step checkout stepper (Payment, Review, Confirm) laid out as a horizontal row of pill buttons on a near-black background. Clicking the active step completes it: the pill fills with a glossy, saturated liquid color, its label is replaced by a small check icon, and it melts into the next pill through a soft gooey neck so the completed steps read as one continuous blob of liquid. Each stage has its own hue (pink, then violet, then green) and the colors blend inside the merged blob. It should feel wet, bouncy and satisfying, like candy-colored liquid being poured from one capsule into the next.
DESIGN SYSTEM: Row centered, three pills about 72x24 px at 1x (scale up to roughly 140x44 px for a real UI), gap about 8 px. Typography: small clean sans serif, 12-14 px, medium weight, white at 85% on idle pills, dark at 80% on filled pills. Idle pill: fill #2A2A2E to #1E1E22 vertical gradient, 1 px inner border rgba(255,255,255,0.08), radius 999 px. Filled colors: pink #FF3DBE to #E01FA8, violet #A855F7 to #7C3AED, green #4ADE80 to #22C55E. Each filled pill has a top specular highlight (white 0 to 45% linear gradient on the upper third, inset), an inner shadow at the bottom, and an outer glow in its own color (0 0 18px at 55% opacity). Background: #050405 with large, very dark diagonal rounded shapes (#1A1416 to #0B090A) blurred in the back for depth.
MOTION: Complete step: the pill fills from left to right with liquid color in 420 ms, cubic-bezier(0.22, 1, 0.36, 1); the label fades out (120 ms) and a check icon scales in from 0.6 to 1 (220 ms, cubic-bezier(0.34, 1.56, 0.64, 1)). Merge: 150 ms after the fill, a gooey bridge grows from the right edge of the completed pill toward the next one; the gap closes into a pinched neck about 40% of the pill height, with an overshoot wobble on the neck width (420 ms, spring stiffness 260, damping 18). Next pill then becomes active: its fill starts in the new hue and the merged edge shows a soft gradient from the previous color. Final step: the green pill fills and the whole blob gives a quick 1.03 scale pulse (240 ms). Glow intensity eases up with each completed step. Hover on the active pill: brightness +8% and a 1.02 scale in 160 ms.
SECTIONS: Parts: track row, three pills, check icons, gooey merge layer, glow layer. States per pill: idle (dark glass with label), active (dark with brighter label and subtle outline), filling, done (liquid color plus check), merged (connected to its done neighbor). Whole component: in progress, complete (all three merged, green end), reset (reverse the merge in 300 ms).
IMPLEMENTATION: Render the colored liquid in an SVG with a gooey filter (feGaussianBlur stdDeviation about 6 then feColorMatrix alpha 18 -7) applied to a group of rounded rects plus small connector circles, and draw the labels, icons and highlights in a separate unfiltered layer on top so text stays crisp. Animate rect widths and connector positions with Motion springs (or GSAP). Use real button elements for each step with aria-current on the active one and visible focus rings; Enter or Space completes the step. prefers-reduced-motion: skip the wobble and fills, just switch colors and show the check with a 150 ms fade. Keep the filter region tight around the row and avoid animating blur radius for performance.
ADAPT TO THE PROJECT: Reuse the project's existing design tokens, button component and fonts; map the pink, violet and green to the closest existing accent or status tokens. Do not copy logos, brand names, photos or illustrations from the original; use placeholders for any content.
SUCCESS CHECK:
- Completing each step fills the pill with its own color, shows a check, and merges into the next pill through a visible gooey neck.
- Labels and check icons stay sharp (not blurred by the goo filter) at every moment.
- With prefers-reduced-motion on, steps still complete and show state changes without wobble or fill animation.