Main nav
A Main Navigation (often referred to as a “sidenav,” “navigation drawer,” or “sidebar”) is a persistent vertical panel that provides primary navigation options within an application or website. It typically appears on the left (or sometimes the right) side of the screen and remains visible as users browse various sections. Sidenavs are especially useful in applications with multiple sections, features, or nested levels of content.
Usage
Primary Navigation: Group high-level items and ensure users can quickly identify where they are within the site or app.
Persistent Access: Keep important links readily available without forcing users to toggle or navigate away.
Hierarchy & Structure: Organize nested items (e.g., sub-navigation) in a way that’s easy to scan and collapse/expand if needed.
Responsive Breakpoints: On smaller screens (like mobile), the nav often collapses into a drawer that slides in/out to conserve real estate.
Use cases
Web apps with multiple pages or modules (e.g., “Dashboard,” “Projects,” “Settings”)
Intranets or enterprise tools requiring quick access to different departments or resources
Mobile websites employing a slide-out drawer (often triggered by a hamburger menu icon)
Not to be confused with
Accordion: Though accordions can appear in a sidenav for sub-level items, an accordion is a generic component for expanding/collapsing content anywhere, not limited to primary navigation.
Breadcrumbs: These show the user’s path or hierarchy (e.g., Home > Category > Subcategory). A sidenav is broader in scope, containing multiple paths or sections.
Best practices
Organize & Label Clearly
Use concise labels that accurately describe each section.
Group related items under logical headings, potentially using collapsible sub-menus if there’s a large number of links.
Highlight Active States
Clearly show which section a user is currently viewing—e.g., bold text, distinct background color, or a colored indicator bar.
Provide hover or focus states for interactive elements to assist both mouse and keyboard users.
Keep It Responsive
In desktop layouts, the nav may remain pinned to the side. On tablets or phones, it might collapse into a drawer with a toggle button (“hamburger” icon) to open and close.
Test across multiple breakpoints to ensure a seamless experience.
Ensure Accessibility
Include appropriate ARIA attributes (e.g., role="navigation", aria-label="main navigation").
Make sub-navigation elements keyboard-navigable, and provide clear focus outlines.
Ensure text and background contrast are sufficient for readability.
Minimize Clutter
Don’t overload the sidenav with too many links or nested levels.
Use collapsible sections or a two-level approach if necessary, but keep the structure simple and intuitive.
Maintain Consistency
If your layout includes a brand logo at the top of the sidenav, keep it in the same position on all pages.
Apply consistent spacing, typography, and iconography throughout.
Animate Subtlely
If sub-menus expand or the drawer slides in/out, use smooth, subtle animations that aren’t distracting.
Keep motion short (e.g., 200–300ms) so it feels natural and responsive.
Clearly indicate the currently active or selected section so users never lose track of their location.
Summary
A Main Nav / Sidenav / Navigation Drawer is central to how users explore and interact with an application or website’s core sections. By presenting key navigation items in a consistent, easily accessible vertical layout, you help users quickly orient themselves and move between features. With clear labeling, responsive design, proper accessibility, and thoughtful organization, a well-crafted sidenav can vastly improve the overall navigation experience, whether on desktop or mobile.