Animated Underline Navbar

About this block

Animated Underline NavbarPRO

Minimal navbar with configurable animated underline effects (slide, grow, or fade) on navigation links. Perfect for portfolio sites and creative agencies wanting subtle hover animations.

Minimal, centered-max-width navbar for portfolios and creative agencies where each nav link carries a configurable hover/active underline animation instead of background highlighting. The active page is driven by an activeNavItem prop rather than route detection.

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/navbar31?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

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

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

Quick start

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

tsx
import { Navbar31, navbar31Demo } from "@/components/beste/block/navbar31";

export default function Layout() {
  return <Navbar31 {...navbar31Demo} />;
}

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

tsx
import { Navbar31 } from "@/components/beste/block/navbar31";

export default function Layout() {
  return (
    <Navbar31
      logo={{ text: "Studio", href: "/" }}
      navItems={[
        { label: "Home", href: "/" },
        { label: "Work", href: "/work" },
        { label: "Contact", href: "/contact" },
      ]}
      activeNavItem="Home"
      buttons={[{ label: "Sign up", href: "/signup" }]}
      underlineStyle="grow"
    />
  );
}

Props

PropTypeDefaultDescription
logo{ text: string; href?: string }Brand text and link; falls back to "brand" / # when omitted
navItemsNavItem[][]Nav links rendered in the desktop bar and mobile menu
activeNavItemstringlabel of the item to mark as current; controls its underline and text color, caller-managed
buttonsArray<{ label: string; href?: string; variant?: "default" | "outline" | "ghost" }>[]Call-to-action buttons after the nav links
underlineStyle"slide" | "grow" | "fade""slide"Which pseudo-element animation the underline uses on hover/active
classNamestringExtra classes for the outer <nav>
ts
type NavItem = { label: string; href?: string };

Behavior notes

  • activeNavItem is not derived from the current route; pass the current page's label yourself to keep the underline in sync with navigation.
  • underlineStyle swaps the underline's animation origin/behavior: slide scales in from the left, grow scales in from the center, fade cross-fades opacity. Non-active items animate the same way on hover.
  • In the mobile menu, a button with variant="default" gets rounded-none applied only there; on desktop it keeps the shadcn default rounding.
  • The bar is sticky (sticky top-0 z-50) with a plain bg-background, no border or blur.
  • The mobile breakpoint is lg (1024px); mobile links are listed full-width with a bottom border per row and lighter (font-light) weight.

More Navigation blocks

View all Navigation
PRO

navbar35

Sliding Indicator Navbar

Responsive navbar with animated sliding underline indicator that follows hover and highlights active navigation item. Perfect for SaaS dashboards and apps wanting polished micro-interactions.

PRO

navbar79

Announcement Navbar

A sticky navbar topped by a thin ink announcement bar with a small-caps link, then a frosted bar with the serif wordmark, uppercase links that underline from the left on hover, a sliding-marker pill, and a light full-height mobile menu whose links settle in one after another.

PRO

navbar36

Tab-Style Navbar

Navbar with tab-style navigation supporting underline or pill active states for app-like navigation. Perfect for dashboards and admin panels with section-based interfaces.

PRO

navbar73

Announcement Bar Navbar

A navbar with a dark announcement strip above a hairline-bordered row carrying a lowercase wordmark, uppercase links, a sign-in link, an accent call to action, and a mobile menu.

PRO

navbar71

Pill Menu Navbar

A light editorial navbar with a lowercase wordmark, soft muted nav pills that reveal hover dropdowns, a solid accent call to action, and a collapsing mobile menu.

PRO

navbar78

Classic Navbar

The classic layout in the language: serif wordmark on the left, uppercase letter-spaced links in the middle that underline from the left on hover, a quiet text link and a sliding-marker pill on the right, and a light full-height mobile menu whose links settle in one by one.