Repository navigation
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
We need to implement a navbar with multiple mega menu dropdowns that have consistent width and centered positioning, as shown in the attached image. However, we're encountering two main issues when trying to achieve this with flowbite-react components and Flotiq React Blocks PRO examples.
Issues Encountered
Issue 1: MegaMenuDropdownToggle Approach
When using MegaMenuDropdownToggle components (from FlowbiteBlock PRO MegaMenuHeader example):
- Only the first dropdown opens correctly
- All subsequent dropdowns open the same (first) dropdown content
- Setting custom
idattributes anddata-collapse-toggleproperties doesn't resolve the issue - The
menuOpenprop doesn't work as expected (menu opens by default regardless of the prop value)
Issue 2: MegaMenuDropdown with toggle Prop Approach
When using MegaMenuDropdown components with the toggle prop:
- Multiple dropdowns work functionally (each opens its own content)
- However, it's impossible to achieve consistent centered positioning
- CSS positioning attempts fail:
theme.basewithfixed,left-1/2, and-translate-x-1/2classes don't center properly- Inline
styleprop withleft: "50%"andtransform: "translateX(-50%)"gets overridden - Custom theme styles are ignored or overridden by internal component styles
Issue 3: Multiple MegaMenu Components
When trying to use multiple MegaMenu components within a single NavbarCollapse:
- Clicking one dropdown doesn't close others (multiple dropdowns can be open simultaneously)
- Creates invalid HTML structure (nested
<nav>elements within<ul>)
Steps to reproduce
Reproduce Issue 1 (MegaMenuDropdownToggle)
- Visit the CodeSandbox example
- Ensure preview is at least 1280px width (desktop view)
- Click "Company" in the first navbar
- Click "Marketing" in the first navbar
Current behavior
Both buttons open the same dropdown content.
Expected behavior
Each button should open its own unique dropdown content, with proper toggle behavior (clicking one closes the other).
Reproduce Issue 2 (MegaMenuDropdown styling)
- Visit the same CodeSandbox example
- Ensure preview is at least 1280px width (desktop view)
- Click "Company" in the second navbar
- Click "Marketing" in the second navbar
- Observe the positioning of the dropdown menus
Current behavior
Dropdowns open but are not centered consistently. Styling attempts are ignored.
Expected behavior
All dropdowns should be centered horizontally on the page with consistent positioning, similar to the first navbar's visual appearance.
Context
This issue occurs across all browsers, screen sizes, and operating systems.
Demo Repository: https://codesandbox.io/p/github/SalvadorDalia/flowbite-mega-menu/main
Expected Solution
We need a way to:
- Create multiple functional mega menu dropdowns within a single navbar
- Ensure each dropdown opens its own unique content
- Provide reliable styling options for consistent centered positioning
- Maintain proper HTML semantics and accessibility
- Support proper toggle behavior (opening one closes others)
Activity
[-]It is not possible to have two MegaDropdowns in one MegaMenu[/-][+]Multiple MegaMenuDropdowns: Positioning and functionality issues with centered layout[/+]SalvadorDalia commentedon Aug 11, 2025
Hi, is there any update on this issue? Could we please get an estimated time for the patch to be released?
SutuSebastian commentedon Aug 12, 2025
Hey there, thanks for reporting.
I know @connerdavis47 / @tulup-conner worked on this component, maybe he can bring more light on what's happening here.
SalvadorDalia commentedon Sep 22, 2025
Hi,
we're currently blocked by the dropdown behaviour and styling inconsistencies, and would really appreciate any guidance or an estimated timeline for a fix.
Let me know if there's anything we can do to help test or clarify further.
Thanks for your work on this!
docs(MegaMenu): give multiple dropdowns example a full width row
jorj-pineda commentedon Aug 12, 2026
Opened #1685, which fixes the multiple-dropdown behaviour reported here (issues 1 and 3) — each toggle now controls its own dropdown, and opening one closes the others. There is a short demo video on the PR.
I left the centred-positioning problem (issue 2) out deliberately:
classNameis forwarded to both the trigger and the floating panel, and the panel carries inline positioning styles from Floating UI that a utility class cannot override, so fixing it properly needs an API decision from the maintainers. I have written up the reasoning in the PR and would be glad to follow up once there is a preferred direction.@SalvadorDalia — you mentioned you could help test. If you are able to try the branch against your setup, confirmation that it unblocks the multiple-dropdown part of your case would be useful evidence for the maintainers.