Floating Pill Navbar

About this block

Floating Pill NavbarPRO

Centered floating navbar with rounded pill shape, backdrop blur effect, and compact layout. Perfect for modern landing pages and portfolios wanting a minimal floating navigation style.

A compact navbar that floats off the viewport edge instead of spanning full width: it sits inside a max-w-4xl wrapper with its own margin, and the inner <nav> is a bordered, backdrop-blurred pill (rounded corners on mobile, fully rounded on desktop) rather than a bar with a bottom border. A position prop pins the whole thing near the top or bottom of the viewport, which suits landing pages and portfolios that want a minimal, detached navigation style.

Upgrade to Pro

Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.

Upgrade Now

Installation

Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/navbar37?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/navbar37?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/navbar37.tsx and the shadcn/ui dependencies it needs (button).

Quick start

The installed file exports navbar37Demo alongside the block: the exact props behind the preview above. Spread it to get a working navbar in one line.

tsx
import { Navbar37, navbar37Demo } from "@/components/beste/block/navbar37";

export default function Layout() {
  return <Navbar37 {...navbar37Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Navbar37 } from "@/components/beste/block/navbar37";

export default function Layout() {
  return (
    <Navbar37
      logo={{ text: "Float", href: "/" }}
      navItems={[
        { label: "Home", href: "/" },
        { label: "Features", href: "/features" },
        { label: "Pricing", href: "/pricing" },
      ]}
      actionButton={{ label: "Get Started", href: "/signup" }}
      position="top"
    />
  );
}

Props

PropTypeDefaultDescription
logo{ text: string; href?: string }–Brand text and link, shown at the left
navItemsNavItem[][]Desktop and mobile nav links, in order
actionButton{ label: string; href?: string }–Single CTA rendered right of the nav; omit to hide it
position"top" | "bottom""top"Whether the floating pill sticks near the top or bottom of the viewport
classNamestring–Extra classes for the outer wrapper <div>
ts
type NavItem = { label: string; href?: string };

Behavior notes

  • The outer <div> is sticky top-0 with a top-4 or bottom-4 offset depending on position, keeping the pill floating a fixed gap from the edge instead of flush against it.
  • The <nav> itself uses bg-background/95 with backdrop-blur (and a supports-[backdrop-filter] fallback opacity), so content scrolling underneath shows through softly.
  • Corners are rounded-xl on mobile and rounded-full from md up, giving a boxier shape on small screens and a true pill on desktop.
  • Desktop nav links and the action button show at md and above; below that a hamburger button toggles a conditionally rendered panel ({mobileMenuOpen && ...}) inside the same pill, stacking links and a full-width button.
  • There is only a single actionButton, not an array, so this block supports exactly one CTA by design.

More Navigation blocks

View all Navigation
PRO

navbar63

Floating Pill Navbar

PRO

navbar74

Floating Capsule Navbar

PRO

navbar71

Pill Menu Navbar

Get Pro access