nextra
nextra copied to clipboard
Nextra3: navbar menu rendered in portal
This is not really a bug but a new behaviour that should be mentioned in the migration guide. In our case we are adding css variables to the nextjs root in pages/_app.tsx. Our navbar menu is not styled correctly with nextra3, because the menu now gets rendered inside a portal outside of the next app container where the css variables are not defined. Maybe it helps someone else with migrating!
This might help others too:
The behavior change seems related to HeadlessUI v2's integrated Floating UI. Nextra v3 migrated to HeadlessUI v2 (from v1.7), and I've seen similar changes in:
- Navbar menu
- Theme switch (nextra-theme-docs)
- Locale switch
- Search result panel
closed since Nextra 4 is released