Aligning Some NavigationMenuItems to the Right in the NavigationMenu #2683
Replies: 2 comments
-
This is the top google link when you google: However if you just want something. I created a second menu within the nav and pushed that one left with auto left margin. Not saying it's right... Just saying I got the result I wanted :) |
Beta Was this translation helpful? Give feedback.
-
Same experience, I had the same idea and wanted to align my navigation menu to the right, but I couldn't find any information about it in the radix documentation and Google brought me here - without any results. So I tried it myself and came up with the following solution, which works for my use case. Give the respected <NavigationMenuContent className="align-right"> In your nav:has(.align-right) > .left-0 {
right: 0;
left: auto;
} |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm working with the
NavigationMenu
component and I'm trying to achieve a specific layout where someNavigationMenuItem
s are aligned to the left of the screen, while others (such as login and theme change options) are aligned to the right. I'm unsure of the best practices for accomplishing this with theNavigationMenu
component.Is there a recommended way to position some
NavigationMenuItem
s to the right side of the screen? I'm looking for a solution that aligns with the intended use of the component and maintains accessibility and responsiveness.Thank you in advance for your guidance!
Here is my current code:
Beta Was this translation helpful? Give feedback.
All reactions