Navbar
betaA site header — brand, navigation, actions and a mobile menu — that is static, sticky or hides on scroll, flat at the top and lifted over content.
- Navigation
- 1 file
- 1 npm package
- Accessibility notes
pnpm dlx @dowel-ui/cli add navbarnpm packages installed: class-variance-authority.
import { Navbar } from "@/components/ui/navbar";Default
Floating
Hide On Scroll
<Navbar>
| Prop | Type | Default |
|---|---|---|
behavior | "static" | "sticky" | "hide-on-scroll" | "sticky" |
elevateLift the bar — border, shadow, blur — once the page has scrolled. Default true. | boolean | true |
innerClassNameClass for the inner row that holds the parts. | string | — |
variant | "default" | "floating" | "glass" | "default" |
Plus every attribute of <header>.
<NavbarSkipLink>
Plus every attribute of <a>.
<NavbarBrand>
Plus every attribute of <a>.
<NavbarContent>
Plus every attribute of <div>.
<NavbarActions>
Plus every attribute of <div>.
<NavbarMobileMenu>
| Prop | Type | Default |
|---|---|---|
labelAccessible name for the menu button. Default "Menu". | string | "Menu" |
Plus every attribute of <div>.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes