← All components
Interaction / component

Gooey Nav

A navigation pill gathers into place through soft, colorful particle motion.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Original particle keyframes, blur and contrast are retained. One owned clock drives the animation; bursts are capped at 40 particles and settle completely.
  • Native anchors support keyboard navigation and modified clicks. The demo handles selection locally; the reusable component follows item hrefs.
  • initialActiveIndex applies at mount. Use activeIndex to control selection after mount.
  • Demo.tsx includes the full composition. Reduced motion, pause, hidden and offscreen behavior use an owned animation clock.
React 19.2Pointer Events

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
animationTimenumber600Duration
particleCountnumber15Particles
particleRnumber100Rotation
timeVariancenumber300Time variance
initialActiveIndexnumber0Initial item
itemsGooeyNavItem[]Home, Work, AboutEach item contains label and href. Links preserve native navigation semantics.
activeIndexnumberundefinedControlled selected index.
onSelect(index, item, event) => voidundefinedSelection callback. Prevent the event default only when handling navigation yourself.
particleDistances[number, number][90, 10]Outer and inner orbit distances in CSS pixels.
colorsnumber[][1,2,3,1,2,3,1,4]Palette indices 1–4; override scoped --color-1 through --color-4 variables.
labelstring"Main navigation"Accessible navigation label.
pausedbooleanfalseFreeze decorative motion.
replayTokennumber0Change to replay or reset the effect.
classNamestring''Text classes for Curved Loop; outer classes for the other components.