Import
Usage
Props
The Nav component extends all standard HTML<nav> element attributes and accepts the following additional props:
Content displayed on the left side of the navigation bar.
Content displayed in the center of the navigation bar.
Content displayed on the right side of the navigation bar.
Content displayed in the mobile hamburger menu (hidden on screens wider than
sm breakpoint).When true, the navigation bar uses
position: fixed, otherwise uses position: absolute.When enabled, the navigation bar has a floating card style with rounded corners and margins.
Disables the backdrop blur effect on the navigation bar.
Hides the hamburger menu button and mobile menu completely.
Prevents the mobile menu from automatically closing when clicking outside.
CSS class for the background color of the navigation bar.
Object of CSS classes with boolean values for conditional styling.
Behavior
- The component is positioned at the top of the page with
z-50 - On mobile (below
smbreakpoint), a hamburger menu icon appears in the top right - Clicking the hamburger toggles the mobile menu with smooth animations
- The mobile menu automatically closes when clicking outside (unless
nodismissis true) - Elements with the class
nav-ignore-dismisswill not trigger menu dismissal when clicked - The navigation spans full width with content constrained to a
max-w-7xlcontainer
Examples
The mobile menu appears below the main navigation bar when opened. Make sure your page content accounts for the navigation height to avoid overlapping, especially when using
fixed positioning.