Mobile Navigation Menu
A mobile navigation menu that is accessible with a button in the header when the screen is too small for the regular nav menu in the header.
We add the sheet Shadcn UI components for displaying the mobile navigation.
A new component containing the mobile nav menu in a sheet - the Shadcn UI component installed earlier is added. src/components/mobile-nav.tsx
:
The site header is updated by including the mobile nav component. src/components/site-header.tsx
:
The links in the main navigation are modified to hide if the mobile navigation is available. src/components/main-nav.tsx
:
Last Updated: