Dot Nav Dock
A floating navigation dock of matching rounded buttons with room to breathe between them. The selected button wears a holographic ring of spectrum colours that slowly turns round it, with white glares where the light hits; pick another and the ring moves there.
Features
- •A holographic ring — The selected button wears a thin ring of spectrum colour bands (blue, cyan, red, magenta, green, gold) with dark gaps between them, slowly turning round it, with two white glares where the light hits.
- •Corners that follow — Snug padding round the buttons and a wider gap between them; the dock's corners are the buttons' corners plus the padding, so the curves run parallel.
- •Your buttons — Any number of buttons, each with a label (read out and shown as a tooltip) and your own icon or image. The first shows your logo, or the Dot mark.
- •Works as navigation — Real buttons in a nav landmark: the selected one is marked as the current page, onChange tells you which was picked, and keyboard focus shows a clear ring.
- •Your colours — Dock, buttons, the selected button, icons and the selected icon, in any CSS colour, plus button size, ring speed and the glares.
- •Fits anywhere — Plain React and CSS in one file. The dock shrinks to fit narrow spaces, and the ring holds still with reduced motion.
Props API Reference
10 configurable props| Prop | Type | Default | Description |
|---|---|---|---|
| items | { id, label, icon?, image? }[] | Home, Components, Ask AI | The buttons, in order; the first one without an icon shows your logo. |
| logo / logoSize | string / number | Dot mark / 0.36 | Your logo for the first button, and its size as a share of the button (0.1–0.8). |
| iconSize | number | 0.375 | Icon size as a share of the button (0.1–0.8). |
| defaultActive / onChange | string / (id: string) => void | first item / undefined | The button selected at first, and a callback when one is picked. |
| glare / speed | boolean / number | true / 10 | White glares on the ring, and seconds for the ring to turn once. |
| size | number | 64 | Button size in px. |
| dockColor / buttonColor / activeButtonColor | string | "#0F0F11" / "#161618" / "#1C1C1F" | The dock, the buttons and the selected button. |
| iconColor / activeIconColor | string | "#7C7C80" / "#F4F4F5" | Icons, and the selected button's icon. |
| background | string | "#0B0B0C" | Behind the dock; "transparent" for none. |
| className / style | string / CSSProperties | undefined | On the wrapper; it fills its parent and centres the dock. |