Sidebar Drawer Navbar

About this block

Sidebar Drawer NavbarPRO

Navbar with slide-in sidebar drawer featuring grouped navigation sections and overlay backdrop. Perfect for content-rich sites wanting organized off-canvas navigation menus.

Navbar for content-rich sites that want their full navigation off-canvas: a slim top bar shows only the logo, up to four links, and action buttons, while a hamburger opens a full-height slide-in drawer with grouped, titled sections for everything else.

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

Base UI flavor

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

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

Quick start

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

tsx
import { Navbar34, navbar34Demo } from "@/components/beste/block/navbar34";

export default function Layout() {
  return <Navbar34 {...navbar34Demo} />;
}

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

tsx
import { Navbar34 } from "@/components/beste/block/navbar34";

export default function Layout() {
  return (
    <Navbar34
      logo={{ text: "Acme", href: "/" }}
      navSections={[
        { items: [{ label: "Home", href: "/" }, { label: "Blog", href: "/blog" }] },
        {
          title: "Company",
          items: [
            { label: "Careers", href: "/careers" },
            { label: "Contact", href: "/contact" },
          ],
        },
      ]}
      actionButtons={[{ label: "Get started", href: "/signup" }]}
      sidebarPosition="left"
    />
  );
}

Props

PropTypeDefaultDescription
logo{ text: string; href?: string }Brand text and link; falls back to "Brand" / # when omitted
navSectionsNavSection[][]Grouped nav links shown inside the drawer; only the first section's first 4 items also appear inline in the top bar
actionButtonsArray<{ label: string; href?: string; variant?: "default" | "outline" | "ghost" }>[]Buttons shown in the desktop top bar and repeated in the drawer footer
sidebarPosition"left" | "right""left"Which edge the hamburger button and the drawer itself are anchored to
classNamestringExtra classes for the outer <nav>
ts
type NavSection = { title?: string; items: NavItem[] };

type NavItem = { label: string; href?: string; icon?: React.ReactNode };

Behavior notes

  • Only navSections[0]'s first four items appear inline in the desktop top bar; every section (including titled ones), any items past the fourth, and the full nav always live in the drawer only.
  • The hamburger button sits on the same edge as sidebarPosition, and the drawer slides in from that same edge, capped at w-80 and 85vw on narrow screens, with a translate-x transition.
  • Opening the drawer sets document.body.style.overflow = "hidden" to lock background scroll, restored automatically on close or unmount.
  • A full-screen blurred backdrop (bg-background/80 backdrop-blur-sm) closes the drawer on click; clicking any link inside the drawer also closes it.
  • Section titles render only when title is set, as an uppercase muted label above that group's items; each NavItem can carry an arbitrary icon node rendered before its label.

More Navigation blocks

View all Navigation
PRO

navbar49

Drawer Navbar

Minimal navbar with an availability status whose menu opens a dark right-side drawer — numbered links float in with a stagger over a backdrop, with a seal CTA and socials below.

PRO

navbar64

Fullscreen Overlay Navbar

A quiet top bar whose menu button opens a full-screen overlay — oversized numbered links with hover arrows, a contact block and social row beneath. Pure Auralis big type.

PRO

navbar40

Breadcrumb Navbar

Two-row navbar with main navigation and secondary breadcrumb bar for hierarchical content paths. Perfect for e-commerce product pages and documentation with deep category structures.

PRO

navbar82

Full Screen Menu Navbar

A minimal bar with a wordmark, a sliding-marker pill and a two-line menu toggle that turns into a cross, opening a full-screen ink menu with film grain: numbered oversized serif links settle in one after another on the left, the photograph and description on the right blur to whichever link is hovered, and a ruled foot carries contact details, social links and the pill. The menu is always in the markup and shown with CSS.

PRO

navbar45

Fullscreen Overlay Navbar

Dark navbar with a hamburger menu cell that opens a fullscreen overlay — the panel and its centered links cascade down from the top, with a contact footer.

PRO

navbar74

Floating Capsule Navbar

A navbar contained in a softly rounded, bordered capsule with a lowercase wordmark, uppercase links, an accent call to action, and a matching mobile panel.