
Immersive Full-Screen Navigation
Navigation
A direction-aware mega menu where hovering across the top-level items slides each panel in from the side you moved towards, with a separate tap-friendly, keyboard-accessible menu on smaller screens.
Directional Menu gives navigation spatial presence: on desktop, hovering a top-level item opens a white mega-menu panel below the header, and moving to an item to its left or right slides the new content in from that side while the panel eases to the new height.
Use it when the site has enough structure to justify a designed menu moment: services, products, resources, docs, use cases, or portfolios. For three links, keep it boring and fast.
The main risk is cleverness in the one place every visitor needs reliability. The desktop menu opens on hover only: its top-level items are buttons with no click, focus, Escape or aria-expanded handling, and an item with a link but no panel (like About) doesn’t navigate. Below 1024px a separate mobile menu takes over with a toggle button, expandable sections, Escape to close, focus trapping and focus restore. Add keyboard and click support to the desktop menu before relying on it as main navigation.
import DirectionalMenu from "@/components/effects/directional-menu"; const page = () => { return ( <DirectionalMenu activeColor="#ffffff" inactiveColor="#ffffff" panelGap={20} closeDelay={80} duration={0.35} menuBgColor="#ffffff" /> );}; export default page;A SaaS platform with separate products, solutions, and developer resources can use Directional Menu as its main header navigation. When a visitor moves from one top-level item to the next, the panel content slides in from that side, so moving between Products and Solutions reads as travel across one connected menu.
The outcome is orientation. Audience groups such as startups, enterprise, and agencies sit in clearly grouped panels, and on smaller screens the same items collapse into a mobile menu with expandable sections.
Not for tiny sites, hover-only menus, checkout, forms, or navigation where speed and reliability are the whole job.
Keep panel animations short, avoid layout shift, and do not block route transitions or scroll restoration.
The mobile menu (below 1024px) already uses a toggle button with aria-expanded and an open or close label, accordion sections with aria-expanded, real links, Escape to close, focus trapping and focus restore, and it doesn’t depend on hover. The desktop mega menu opens only on mouse hover, so add click, focus, aria-expanded and Escape handling there yourself. With reduced motion, panels switch instantly instead of sliding, and only opening and closing the menu fade.
| Prop | Type | Default | Description |
|---|---|---|---|
closeDelay | number | 80 | Delay before closing the menu. |
panelGap | number | 20 | Gap between trigger and submenu panel. |
activeColor | string | #ffffff | Color for active menu state. |
inactiveColor | string | #ffffff | Color for inactive menu state. |
duration | number | 0.35 | Menu transition duration. |
menuBgColor | string | #ffffff | Background color of the menu dropdown panels. |
Use it when a multi-section marketing site wants mega-menu panels that slide in from the side the visitor moves towards on desktop, and you are prepared to add keyboard and click support to the desktop menu.
Partly. Below 1024px the mobile menu works by tap and keyboard with no hover needed. The desktop mega menu opens only on mouse hover, so keyboard and touch users on wide screens can’t open its panels until you add click and focus handling.
In the mobile menu, Escape closes it, focus is trapped across the toggle and panel while open, and focus returns to the toggle on close. The desktop mega menu has no Escape handling or focus management; it closes when the pointer leaves, after a short close delay.
Below 1024px the desktop menu is hidden and a mobile menu appears: a toggle button opens a dropdown panel where items with panels become expandable accordion sections and plain items are links that close the menu when tapped.
When prefers-reduced-motion is on, the desktop panel opens and closes with a short fade of about 0.16 seconds and switches content without sliding sideways, and the mobile menu’s transitions and chevron rotation are turned off.
Yes. A custom version can define motion rules, visual treatment, desktop keyboard and click support, performance budget, fallback behaviour, source handoff, and implementation notes for the specific page or launch context.
Need a custom effect? Tell us what to create.