Glass Mega Navbar
A full-width bar that contracts into a floating glass pill on scroll. Menus open into one mega panel that slides between sections with a blur, a hover pill glides between triggers, and phones get a disclosure sheet.
Try it: Scroll the frame to shrink the bar; hover or click Product / Resources; Esc closes.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/glass-mega-navbar.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/glass-mega-navbar. You can also copy the source into components/ui/glass-mega-navbar.tsx (view on GitHub).
Usage
import { GlassMegaNavbar } from '@/components/ui/glass-mega-navbar'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
items | NavItem[] | DEFAULT_NAV_ITEMS | { label, href?, links?, feature? } |
shrinkAt | number | 24 | Scroll px before the bar becomes a pill. |
scrollContainer | RefObject<HTMLElement> | window | Element whose scroll drives the shrink. |
brand / ctaLabel | ReactNode / string | — | Logo and CTA copy. |
Dependencies
motionlucide-react
Related Website Sections components
- Pricing Plans
Three-tier pricing with a sliding monthly/yearly switch whose numerals roll digit by digit, a highlighted ink plan with a light rim, and a “you save” chip that springs in on yearly.
- Activity Rings
Apple Watch-style concentric progress rings: gradient strokes sweep in on a spring, overshooting 100% laps over itself with a shadowed tip, and the legend numbers roll up.
- FAQ Accordion
A two-column FAQ: rows expand on a height spring, the plus rotates into a cross, the open row lifts onto a soft surface and answers un-blur in. ↑ ↓ Home End move between questions.
- Spotlight Command Palette
A cmdk-style ⌘K launcher: fuzzy grouped results, a highlight that springs between rows, nested pages (Backspace to go back), key-cap hints and full combobox semantics with focus restore.
- Testimonial Wall
A masonry wall of quote cards whose columns drift in opposite directions at different speeds, faded at the edges, with a pause button; reduced motion shows a static scrollable wall.
- Glass App Dock
A macOS-style dock: icons magnify on a spring with a cosine falloff around the pointer, labels float above, launching bounces the icon and lights a running dot. Keyboard focus magnifies too.