Navbars with mobile menu and mega menu
Headers for sites and apps, each with its own phone menu.
Switch category
Marketing
- Hero17
- Features15
- Logo clouds8
- Stats8
- Pricing11
- Testimonials11
- Call to action11
- FAQ7
- Newsletter12
- Banners9
- Popups and consent7
- Services7
- Use cases6
- Security and trust7
- Changelog and roadmap6
- Launch and waitlist6
- Product tour6
- Press and awards10
- AI features6
- App download5
- Donations and support4
- Problem and solution5
- Objections5
- Calculators10
- Quiz and product finder5
- Free trial5
- Referral and partners10
- Community5
- Open source5
- Manifesto5
- Offer5
- Lead magnet4
- Scroll stories20
- Scroll journeys13
- Scroll effects13
- Scroll reveals and transitions15
Content
- Blog16
- Gallery7
- Team8
- About11
- Content8
- Process7
- Contact8
- Comparison5
- Integrations5
- Error pages5
- Careers7
- Case studies6
- Portfolio6
- Events and webinars6
- Help center6
- Legal pages5
- Documentation4
- Search results5
- Resources and downloads4
- Podcast4
- Editorial15
- Authors and interviews10
- Glossary5
- Recipes5
- Data stories10
- Long reads5
- Surveys and feedback14
- Form states12
- Request forms16
- Applications and sign-ups13
- Address, payment and consent12
App
- Authentication9
- Dashboards6
- Tables6
- Settings5
- AI and chat16
- Calendar5
- Inbox and messages5
- Notifications6
- Files6
- Projects6
- Profiles6
- Onboarding6
- Billing and usage10
- Developer settings15
- Security and access10
- Import, export and history15
- Automation and builders14
- AI answers18
- AI writing and creation13
- AI setup14
- AI assistants9
E-Commerce
Industries
- Menus7
- Appointments6
- Listings6
- Courses6
- Rooms and stays5
- Classes and schedules6
- Medical practice5
- Law firm5
- Salon and spa5
- Automotive5
- Travel5
- Sports club5
- Coworking5
- Museum5
- Cinema5
- School5
- Trades5
- Insurance5
- Banking5
- Personal brand15
- Speakers and media kits10
- Creators15
- Coaching and consulting10
- Artists and musicians15
- Dental practice5
- Veterinary practice5
- Therapy practice5
- Weddings and events5
- Architecture studio5
- Tax advisor5
- Estate agent5
- Florist5
- Winery5
- Daycare5
- Driving school5
- Care services5
- Festival5
Elements
- Buttons20
- Forms and inputs22
- Pickers and selections21
- Special input fields20
- Cards10
- Overlays21
- Navigation elements15
- Menu bars and switchers14
- Data display15
- Progress and states13
- Lists, trees and timelines17
- Charts22
- Comparison charts22
- Statistical charts20
- KPI, live and map charts22
- Text effects15
- Text accents16
- Backgrounds19
- Beams, particles and motion18
- Media19
- Code and JSON8
- Panels and splitters4
Which header for which site
The navbar sits on every page, so it has to be quick to read and quick to use. Each of the nine headers here brings its own phone menu, built as a real dialog with focus kept inside, so visitors on a phone get the same paths as on a desktop.
Simple and Minimal fit sites with up to six links. Centered logo suits brands, restaurants and boutiques. Floating glass and Transparent on scroll sit over a hero picture and gain a background once the page moves. Mega menu is for many products or services in groups, With search for shops and docs, With announcement for a launch or a sale. App header carries account and actions inside an application.
Keep the main links to five or six and put the one action you care about at the right as a button. Mark the current page, every variant reads it from the active prop and sets aria-current. Test the phone menu with the keyboard once, Tab should stay inside until you close it.
Details
What Navbar brings along, read from the registry and the source.
- Area
- Layout
- Variants
- 9
- Version
- 1.0.0 · since 1.0.0
- File
- components/ui/navbar.tsx
- npm packages
- None
- Languages
- English and German, 15 texts of its own
- Studio
- All 9 variants editable
- In collections
- SaaS landing page
- Build with AI
- Over MCP in Claude, Cursor, Copilot and Codex
Props
The NavbarProps interface from components/ui/navbar.tsx, with the comments from the code.
variantoptionalNavbarVariantsimplecentered-logofloating-pill-glasswith-mega-menuwith-announcementtransparent-on-scrollwith-searchapp-headerminimal
brandrequired{ name: string; href?: string; logo?: React.ReactNode }linksoptionalNavLink[]secondaryLinksoptionalNavLink[]centered-logo: the links right of the logo
primaryActionoptionalNavActionsecondaryActionoptionalNavActionUsually "Sign in", shown as a quiet link
announcementoptional{ tag?: string; label: string; href: string; linkLabel?: string }with-announcement: the bar above the navigation
searchoptional{ placeholder?: string; suggestions: NavItem[] }with-search: placeholder and the quick links shown in the dropdown
appoptional{ breadcrumb: { label: string; href: string }[]; tabs: NavLink[]; user: { name: string; email: string }; userMenu: NavItem[]; notifications?: number; }app-header: path, tabs and the signed-in person
contactoptional{ label: string; value: string; href: string }[]minimal: a line in the full screen menu, e.g. an address or an email
Built-in texts
Navbar writes these texts itself. The language follows the KitProvider, the labels prop replaces single ones.
Show all 15 texts
| Key | English | German |
|---|---|---|
| open | English Open menu | German Menü öffnen |
| close | English Close menu | German Menü schließen |
| closeShort | English Close | German Schließen |
| main | English Main | German Hauptnavigation |
| menu | English Menu | German Menü |
| search | English Search | German Suchen |
| searchShort | English Search… | German Suchen… |
| noResults | English Nothing found. Try a shorter word. | German Nichts gefunden. Versuch ein kürzeres Wort. |
| quickLinks | English Quick links | German Schnellzugriff |
| notifications | English Notifications | German Benachrichtigungen |
| account | English Account | German Konto |
| dismiss | English Dismiss announcement | German Hinweis ausblenden |
| home | English Home | German Startseite |
| help | English Help | German Hilfe |
| contact | English Get in touch | German Kontakt aufnehmen |
Accessibility
Read from the source of the component.
- Navbar handles the keys Escape, Enter, Arrow up, Arrow down, Arrow left, Arrow right, Home, End, Tab and Space itself.
- Sets aria-activedescendant, aria-autocomplete, aria-controls, aria-current, aria-expanded, aria-haspopup, aria-label, aria-modal and aria-selected, so screen readers announce purpose and state.
- Uses the roles combobox, dialog, listbox, menu, menuitem and option.
- Every field has a label, visible or for screen readers.
- Adds text for screen readers where icons and graphics stand alone.
- Shows a visible focus ring when used with the keyboard.
- The server renders the starting state in full, JavaScript only adds the interaction.
Motion
- Rises in briefly the first time it comes into view (kit-rise, useInView).
- Moves with the scroll, its progress follows the position on the page.
- Brings animations of its own, calmly timed and without wobble.
- With reduced motion (prefers-reduced-motion) it stays still. 29 places in the code switch motion off then.
Frequent questions
How do I install Navbar?
With aiw add @ai-website/navbar. The command puts components/ui/navbar.tsx into your project, the code is yours from then on. It brings along button and icon. It needs no further npm packages.
Which variants does Navbar have?
9 variants, Simple, Centered logo, Floating glass, Mega menu, With announcement, Transparent on scroll, With search, App header and Minimal. You pick one with the variant prop, for example variant="centered-logo".
Can I translate the texts of Navbar?
Yes. Navbar carries 15 texts of its own in English and German, such as “Open menu”, “Close menu” and “Close”. The language follows the KitProvider, single texts change through the labels prop.
Can an AI assistant build with Navbar?
Yes. Through the MCP server of the aiw CLI, Claude, Cursor, GitHub Copilot, Windsurf, Codex and Gemini find Navbar with aiw_components and install it with aiw_add @ai-website/navbar. Name the variant in your prompt, for example variant="simple", and the assistant writes your content straight into the props.
Can I adjust Navbar without code?
Yes, in the Studio. All 9 variants are editable there, texts, lists and switches. The Studio writes the matching Navbar code to copy.
Similar components, Often combined with
Similar components
More from Layout, the same area of the kit.
- SidebarsNavigation for applications.
- Page headersThe heads of inner pages and sections. Titles with actions, tabs, figures and search.
- App shellsThe frame of an application. Sidebar, header and panes that fit together on every screen.
- All of LayoutNavbars, footers, page headers, sub navigation and app shells that hold a site together.
Often combined with
Sections that usually sit next to Navbars on a page.
Loading the source