Skip to Content
Documentation
Saas UI
Get Pro
Getting started
Components
Overview

Navbar

Top navigation, typically used as primary navigation in websites or stacked application layouts.

SourceStorybookRecipe
  • Home
  • About
  • Contact

Anatomy

import { Navbar } from '@saas-ui/react/navbar'
<Navbar.Root>
  <Navbar.Content>
    <Navbar.Item>
      <Navbar.Link>Home</Navbar.Link>
    </Navbar.Item>
  </Navbar.Content>
</Navbar.Root>

Usage

Navbar uses position static by default, you can use sticky to make it stick to the top of the page.

Border bottom

Simply add borderBottomWidth="1px" to the navbar to add a bottom border.

Glass variant

The glass variant will make the background translucent with a blur effect.

Solid variant

The solid variant renders the navbar with solid background color.

  • Home
  • About
  • Contact

Hide on scroll

Setting the shouldHideOnScroll prop to true will hide the navbar when the user scrolls down and show it when the user scrolls up. Use the parentRef prop to specify the parent scroll container, defaults to the window object.

With mobile navigation

Add a mobile navigation menu to the navbar using the Drawer component.

  • Features
  • Customers
  • Integrations
  • Pricing
  • Login