crucıble

Lodestar

A floating pill navbar — a frosted near-black bar with a subtle white bottom hairline — that hides on scroll down and reveals on scroll up. Scroll-velocity aware, and never hides while any child has keyboard focus.

motionfree

Installation

CLI

npx shadcn@latest add @crucible/lodestar

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
childrenReact.ReactNodeNav content — links, buttons, a logo, whatever the bar should hold.
scrollContainerReact.RefObject<HTMLElement | null>Scroll container to track instead of the window. Pass a ref to an internal overflow-y-auto element (used by this component's own demo). When provided, Lodestar positions itself sticky inside that container instead of fixed to the viewport.
hideThresholdnumber80Scroll distance in px from the top before the bar is allowed to hide.
Also accepts all props of Omit<HTMLMotionProps<"nav">, "children" | "ref" | "animate" | "variants" | "transition">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.