The NavigationTwo
component is a responsive, advanced navigation bar featuring:
Desktop Menu: Mega menus for categories and pages.
Mobile Menu: Slide-in panel with tabs.
Custom Buttons: Sign-in, contact, and call-to-action buttons.
Social Media Links: Quick links for platforms like YouTube, TikTok, and Twitch.
Dynamic Navigation Items: Add or update categories, links, and featured content.
Project Resources
Tutorial
Step 1: Updating Navigation Links
The navigation links are organized into categories and pages.
Main Navigation Categories
Find the navigation
object at the top:
How to Update:
Categories: Update
name
and add more links underfeatured
,collection
,categories
, orbrands
.Pages: Add standalone links under
pages
.
Example:
Step 2: Customizing the Logo
The logo is handled by the Logo
component:
How to Update:
logoSrc
: Change the path to your logo image.text
: Replace "UI Now" with your brand name.showTextWithImage
: Set tofalse
if you only want the logo image.
Example:
Step 3: Updating Buttons
Sign-In Button
The sign-in button uses the ButtonSignin
component:
Update the
text
prop to change the button label.
Contact and Call-to-Action Buttons
Update
href
with the destination URL.Modify
variant
to change the button style (e.g.,solid
,outline
,ghost
).
Step 4: Mobile Menu
The mobile menu uses Headless UI with Framer Motion for animations.
Tabs for Categories
The mobile menu dynamically creates tabs based on the navigation.categories
:
How to Update:
Add categories in the
navigation
object.Links inside tabs (e.g.,
featured
,categories
) are controlled by the samenavigation
data.
Close Mobile Menu
The menu can be closed using this button:
Step 5: Social Media Icons
Update the social media links in the SocialMediaIcons
component:
Replace the links for each platform with your URLs.
Add/remove platforms as needed.
Step 6: Styling the Navigation
The navigation uses Tailwind CSS for styling. Key classes include:
Background Color:
bg-white
: Change tobg-gray-900
for a dark background.
Text Colors:
text-gray-900
: Update totext-white
for light text.
Hover States:
Border Styles:
Adjust border thickness or colors:
Step 7: Animations
The component uses Framer Motion for smooth animations.
Mobile Menu Animation
Adjust
duration
ory
values to customize the open/close speed and direction.
Testing the Navigation
Run the app locally:
Check Responsiveness:
Verify the menu works on both mobile and desktop screens.
Test Links:
Ensure all links lead to the correct pages.
Final Thoughts
By following this guide, you can:
Update navigation categories, links, and buttons.
Replace the logo and social media links.
Customize the styling and animations to match your brand.