Navbar Floating

A header that shrinks into a floating glass pill on scroll, with a morphing mobile menu.

Built withFloating NavHover NavMagnetic ButtonMorph Menu
Open

Installation

Installs the block and every component it uses.

npx shadcn@latest add https://ombakui.com/r/navbar-floating.json

Usage

Every prop has a default, so it renders as shown. Pass your own copy and links.

import { NavbarFloating } from "@/components/navbar-floating";

export default function Page() {
  return <NavbarFloating />;
}

Props

PropTypeDefaultDescription
brandReactNode–Logo or brand name, linked to home.
links{ label: string; href: string }[]–Main links. Shown inline on desktop and in a morphing menu on small screens.
currentstring–Highlighted link (matches a link's href).
cta{ label: string; href: string }–Call to action on the right.
scrollContainerReact.RefObject<HTMLElement | null>–Use a scrollable element instead of the window.
classNamestring–