Skip to content

Glass Dock Nav

A translucent navigation dock with a sliding highlight.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import GlassDockNav from "./GlassDockNav";
export default function Example() {
return (
<GlassDockNav
items={[
{
"id": "overview",
"label": "Overview"
},
{
"id": "analytics",
"label": "Analytics"
},
{
"id": "billing",
"label": "Billing"
},
{
"id": "settings",
"label": "Settings"
}
]}
colors={[
"#020617",
"#22d3ee"
]}
intensity={0.9}
tilt={1}
minHeight={120}
/>
);
}

Using Glass Dock Nav

Supply navigation destinations through items and keep the selected destination in activeId.

Handle onChange in your application to perform navigation or update selection. Keep labels meaningful even when the dock uses icons.

Props

NameTypeRequiredDefaultDescription
items{ id: string; label: string }[]No[]Array of navigation items to render inside the dock. Each item needs a unique id and a label.
activeIdstringNoundefinedOptional controlled active item id. When provided, the component treats this as the source of truth and calls onChange when items are clicked.
onChange(id: string) => voidNoundefinedCalled when the selection or field values change.
colorsstring[]No["#020617", "#22d3ee"]Array of up to two hex colors used for the dock background and highlight accent.
intensitynumberNo0.9Overall strength of the sliding highlight under the active item.
tiltnumberNo1How much the dock tilts in 3D as you move the pointer across the component.
minHeightnumber | stringNo120Minimum height for the dock container. Accepts a number (pixels) or any valid CSS height string.
classNamestringNoundefinedAdditional CSS class names, merged with base component styles.

Related components

Aurora Tabs

Navigation

A tab strip with a sliding active indicator.

Pagination Rail

Navigation

A raised selection moves through a compact row of numbered page controls.

Layered chevron tabs create a compact trail with a distinct current page.

Folding Menu

Navigation

Numbered navigation panels unfold beneath a compact, tactile trigger.