Bottom Nav Bubble

A bubble that leaps between tabs in the mobile bar

Create a mobile bottom nav with a jumping bubble. A dark pill-shaped bottom bar with 5 icon tabs; behind the active icon sits a round accent-colored bubble that physically leaps to whichever tab is tapped, with a spring (stiffness ~500, damping ~30, a single soft overshoot). Implementation: with Framer Motion, render the bubble only inside the active tab and give it a layoutId (e.g. 'nav-bubble'); switching tabs makes it morph across automatically with the spring. Vanilla: one absolutely positioned bubble whose translateX animates to the active tab's center with an equivalent springy curve. Details: the active icon turns white and pops slightly (scale 1.08, rise 1px, same spring); inactive icons sit at ~55% light opacity with a 200ms color transition. Bar: dark ink, fully rounded, 6px inner padding, floating above the bottom edge with a medium shadow; respect iOS safe-area (padding-bottom: env(safe-area-inset-bottom)). Each tab is a button with an aria-label and aria-current='page' on the active one; tap targets at least 44px. Under prefers-reduced-motion, the bubble teleports with a fade. Build the component, not this demo of it. - Ambient motion that IS the component may loop: a drifting background, a marquee, a spinner while something is genuinely loading. - Do not add any timer, interval, loop or script that performs a person's action by itself. No auto-hover, no auto-click, no cycling through states, no pretend submitting, no replaying the interaction on a schedule. - Every state that answers a person waits for a real event from that person. - Placeholder copy and sample content are welcome. Simulated behaviour is not.

Rate it
0
0

We'd like to measure how the site gets used, with Google Analytics. It sets cookies. Everything the site needs to work runs either way. How we handle data