
Scroll Distortion
Scroll
A compact navigation component that expands only when needed for link-dense marketing pages, product sites, and mobile-friendly menus.
Expanding Navbar gives navigation spatial presence: a compact nav grows only when needed.
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.
In production, the risk is cleverness in the one place every visitor needs reliability. Build keyboard, click, tap, Escape, focus restore, and mobile behavior before adding directional or overlay motion.
import ExpandingNavbar from '@/components/effects/expanding-navbar' const Page = () => { return ( <ExpandingNavbar /> )} A B2B consultancy can use Expanding Navbar to hold a deep site structure in a small header. The compact bar widens across the screen when opened and reveals columns for expertise, solutions, industries, services, and resources, so each layer of the offer is one step away.
The outcome is room without clutter. The header stays light on every page, and visitors who need the full map can open it, move through the columns, and close it again with Escape.
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.
Use real links, aria-expanded triggers, Escape close, and focus restore. Mobile should use a drawer, accordion, or full-screen menu that does not depend on hover.
| Prop | Type | Default | Description |
|---|---|---|---|
expandedWidth | number | 98 | Expanded desktop panel width in viewport units. |
duration | number | 1 | Expansion animation duration. |
backgroundColor | string | #ffffff | Navbar background color. |
activeColor | string | #ff5f00 | Hover or active link accent color. |
menuBackgroundColor | string | #111111 | Background color of the menu bar and expanded menu panels. |
Use it when a space-constrained page with enough links needs a compact nav that grows only when needed.
Yes. It needs click, tap, keyboard, and mobile paths that do not rely on hover.
Escape should close the menu and restore focus to the trigger. Trap focus only while overlay menus are open.
Use a drawer, accordion, or simple full-screen menu that respects touch expectations.
Remove direction travel and large shifts; keep simple visible open/closed states.
Need a custom effect? Tell us what to create.