Bolt mobile

Hamburger Menu Not Opening on Mobile in Bolt App

The hamburger menu icon in your Bolt.new application is visible on mobile screens but nothing happens when users tap it. Alternatively, the menu opens once but then refuses to close, or it opens behind other page content and is invisible.

Mobile navigation is critical for user experience, and a broken hamburger menu effectively makes your entire app unusable on phones and tablets. Users cannot access any page other than the one they landed on, causing immediate bounce rates and lost conversions.

This issue is extremely common in Bolt-generated apps because the AI creates the toggle logic and CSS transitions but doesn't always handle the interaction between state management, z-index stacking, and touch events correctly on real mobile devices.

Error Messages You Might See

Cannot read property 'classList' of null Warning: Maximum update depth exceeded TypeError: toggle is not a function Element is not clickable at point (x, y)
Cannot read property 'classList' of nullWarning: Maximum update depth exceededTypeError: toggle is not a functionElement is not clickable at point (x, y)

Common Causes

  • State toggle not updating — The isOpen state is set but the component doesn't re-render because of a stale closure or missing dependency in the toggle function
  • Z-index too low — The mobile menu panel renders behind the main content or hero section because its z-index is lower
  • Click event not firing on mobile — The onClick handler works with mouse clicks but doesn't respond to touch events on iOS Safari
  • CSS transition broken — The menu is set to translate off-screen but the transition property is missing, so the menu moves but is never visible
  • Menu overlay blocking scroll — The menu opens but a transparent overlay prevents tapping any menu items
  • Conditional rendering removes menu — Using {isOpen && } instead of toggling visibility, causing animation issues

How to Fix It

  1. Debug the toggle state — Add a console.log inside your toggle handler: const toggleMenu = () => { console.log('toggling', !isOpen); setIsOpen(!isOpen); } and verify it fires on tap
  2. Fix z-index stacking — Set the mobile menu to z-50 (or z-index: 50) and ensure parent containers don't create new stacking contexts that trap it
  3. Use button element for toggle — Replace div or span with a proper <button> element which handles both click and touch events natively
  4. Keep menu in DOM always — Instead of conditional rendering, use CSS classes to show/hide: className={`fixed inset-0 z-50 transition-transform ${isOpen ? 'translate-x-0' : '-translate-x-full'}`}
  5. Add backdrop and close behavior — Add a semi-transparent backdrop that closes the menu when tapped: <div onClick={() => setIsOpen(false)} className="fixed inset-0 bg-black/50 z-40" />

Real developers can help you.

Alvin Voo Alvin Voo I’ve watched the tech landscape evolve over the last decade—from the structured days of Java Server Pages to the current "wild west" of Agentic-driven development. While AI can "vibe" a frontend into existence, I specialize in the architecture that keeps it from collapsing. My expertise lies in the critical backend infrastructure: the parts that must be fast, secure, and scalable. I thrive on high-pressure environments, such as when I had only three weeks to architect and launch an Ethereum redemption system with minimal prior crypto knowledge, turning it into a major revenue stream. What I bring to your project: Forensic Debugging: I don't just "patch" bugs; I use tools like Datadog and Explain Analyzers to map out bottlenecks and resolve root causes—like significantly reducing memory usage by optimizing complex DB joins. Full-Stack Context: Deep experience in Node.js and React, ensuring backends play perfectly with mobile and web teams. Sanity in the Age of AI: I bridge the gap between "best practices" and modern speed, ensuring your project isn't just built fast, but built to last. Jen Jacobsen Jen Jacobsen I’m a Full-Stack Developer with over 10 years of experience building modern web and mobile applications. I enjoy working across the full product lifecycle — turning ideas into real, well-built products that are intuitive for users and scalable for businesses. I particularly enjoy building mobile apps, modern web platforms, and solving complex technical problems in a way that keeps systems clean, reliable, and easy to maintain. Luca Liberati Luca Liberati I work on monoliths and microservices, backends and frontends, manage K8s clusters and love to design apps architecture BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years. Sage Fulcher Sage Fulcher Hey I'm Sage! Im a Boston area software engineer who grew up in South Florida. Ive worked at a ton of cool places like a telehealth kidney care startup that took part in a billion dollar merger (Cricket health/Interwell health), a boutique design agency where I got to work on a ton of exciting startups including a photography education app, a collegiate Esports league and more (Philosophie), a data analytics as a service startup in Cambridge (MA) as well as at Phillips and MIT Lincoln Lab where I designed and developed novel network security visualizations and analytics. I've been writing code and furiously devoted to using computers to make people’s lives easier for about 17 years. My degree is in making computers make pretty lights and sounds. Outside of work I love hip hop, the Celtics, professional wrestling, magic the gathering, photography, drumming, and guitars (both making and playing them) Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. Mehdi Ben Haddou Mehdi Ben Haddou - Founder of Chessigma (1M+ users) & many small projects - ex Founding Engineer @Uplane (YC F25) - ex Software Engineer @Amazon and @Booking.com Richard McSorley Richard McSorley Full-Stack Software Engineer with 8+ years building high-performance applications for enterprise clients. Shipped production systems at Walmart (4,000+ stores), Cigna (20M+ users), and Arkansas Blue Cross. 5 patents in retail/supply chain tech. Currently focused on AI integrations, automation tools, and TypeScript-first architectures. Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, currently working at Aircall. I'm open to work in various fields! Simon A. Simon A. I'm a backend developer building APIs, emulators, and interactive game systems. Professionally, I've developed Java/Spring reporting solutions, managed relational and NoSQL databases, and implemented CI/CD workflows.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

Why does my menu work on desktop but not on mobile?

Desktop browsers handle click events differently than mobile browsers. Touch events on iOS Safari have a 300ms delay and may not fire on non-interactive elements like div or span. Always use button elements for interactive controls.

How do I prevent the page from scrolling when the menu is open?

Add overflow-hidden to the body when the menu opens: useEffect(() => { document.body.style.overflow = isOpen ? 'hidden' : 'auto'; return () => { document.body.style.overflow = 'auto'; }; }, [isOpen]);

Related Bolt Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help