File Location
The header component is located atsrc/components/shared/header.tsx. The mobile navigation logic is in a separate component at src/components/shared/mobile-nav.tsx.
Component Structure
Theheader.tsx component consists of three main parts:
- Logo: The site logo, rendered via the
<Logo />component. - Desktop Navigation (
<NavigationMenu />): A full menu visible on medium screens and wider (md:breakpoint). - Mobile Navigation (
<MobileNav />): A hamburger menu icon that triggers a slide-out panel (<Sheet />) on smaller screens.
How to Customize Navigation Links
Navigation links are managed by constant arrays defined at the top of bothheader.tsx and mobile-nav.tsx.
1
Editing Dropdown Menu Items
The “Features” and “Resources” dropdown menus are generated from the
features and resources arrays. To add, remove, or edit an item, modify the corresponding object in the array.src/components/shared/header.tsx
2
Editing Single Navigation Links
Links like “Pricing” and “Blog” are not generated from an array; they are written directly into the JSX code. To edit one, you must modify the
<Link> component.For example, to change the Pricing link to an About Us link, you would edit this section in src/components/shared/header.tsx:Why use two different methods?It’s about dropdowns vs. single links.
- Array-based: Used for the “Features” and “Resources” dropdown menus, which contain a list of related items.
- Direct (Hardcoded): Used for top-level, single links like “Pricing” and “Blog” that don’t have a dropdown.
3
Handling External Links
Sabo handles external links differently depending on whether they are in a dropdown menu or are single, top-level links.
For Dropdown Menu Items
For items within the “Features” or “Resources” dropdowns, you can add theexternal: true property to the item’s object in its respective array. This is a convenience feature that automatically adds target="_blank", rel="noopener noreferrer", and an external link icon.This pattern is enabled by default in the resources array, but can be added to the features array if needed.src/components/shared/header.tsx
For Single Links
For top-level links like “Pricing” or “Blog”, which are not in a dropdown, you need to manually change the<Link> component to a standard <a> tag and add the necessary attributes.Here is how you would change the “Blog” link to an external link:Customizing Action Buttons
The “Sign in” and “Get Started” buttons are located at the end of the desktop navigation section. You can customize their text and links by editing theButton components.
src/components/shared/header.tsx
mobile-nav.tsx.