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.

Kingsley Omage Kingsley Omage Fullstack software engineer passionate about AI Agents, blockchain, LLMs. Matt Butler Matt Butler Software Engineer @ AWS hanson1014 hanson1014 Full-stack developer experienced in fixing and deploying AI-generated apps from Lovable, Bolt.new, Cursor, and Replit. I specialize in debugging Supabase integration issues (auth flows, RLS policies, database connections), fixing broken deployments, resolving routing/blank screen problems, and cleaning up messy React/Vite codebases. I also build production apps with the Claude API and have shipped a Mac desktop dev tool (Nexterm from scratch. Based in Hong Kong, fast turnaround. Franck Plazanet Franck Plazanet I am a Strategic Engineering Leader with over 8 years of experience building high-availability enterprise systems and scaling high-performing technical teams. My focus is on bridging the gap between complex technology and business growth. Core Expertise: 🚀 Leadership: Managing and coaching teams of 15+ engineers, fostering a culture of accountability and continuous improvement. 🏗️ Architecture: Enterprise Core Systems, Multi-system Integration (ERP/API/ETL), and Core Database Structure. ☁️ Cloud & Scale: AWS Expert; architected systems handling 10B+ monthly requests and managing 100k+ SKUs. 📈 Business Impact: Aligning tech strategy with P&L goals to drive $70k+ in monthly recurring revenue. I thrive on "out-of-the-box" thinking to solve complex technical bottlenecks and am always looking for ways to use automation to improve business productivity. Dor Yaloz Dor Yaloz SW engineer with 6+ years of experience, I worked with React/Node/Python did projects with React+Capacitor.js for ios Supabase expert AUXLE AUXLE I am a Full Stack Developer experienced in building Websites, Web apps and Cross Platform Mobile Apps for Startups and Companies. BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years. ISHANTDEEP SINGH ISHANTDEEP SINGH Senior Software Engineer with 7+ years of experience in React, JavaScript, TypeScript, Next.js, and Node.js. I’ve also worked as a tech lead for startups, owning end-to-end technical execution including architecture, development, scaling, and delivery. I bring a strong mix of hands-on coding, product thinking, and technical leadership, and I’m comfortable building products from scratch as well as improving and scaling existing systems. Basel Issmail Basel Issmail ’m a Senior Full-Stack Developer and Tech Lead with experience designing and building scalable web platforms. I work across the full development lifecycle, from translating business requirements into technical architecture to delivering reliable production systems. My work focuses on modern web technologies, including TypeScript, Angular, Node.js, and cloud-based architectures. I enjoy solving complex technical problems and helping teams turn product ideas and prototypes into working platforms that can grow and scale. In addition to development, I often collaborate closely with product managers, business analysts, designers, and QA teams to ensure that solutions align with both technical and business goals. I enjoy working with startups and product teams where I can contribute both as a hands-on engineer and as a technical partner in designing and delivering impactful software. Taufan Taufan I’m a product-focused engineer and tech leader who builds scalable systems and turns ideas into production-ready platforms. Over the past years, I’ve worked across startups and fast-moving teams, leading backend architecture, improving system reliability, and shipping products used by thousands of users. My strength is not just writing code — but connecting product vision, technical execution, and business impact.

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