nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Nextra3: navbar menu rendered in portal

Open moklick opened this issue 1 year ago • 1 comments

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!

moklick avatar Oct 02 '24 11:10 moklick

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

87xie avatar Oct 02 '24 16:10 87xie

closed since Nextra 4 is released

dimaMachina avatar Jan 23 '25 20:01 dimaMachina