Skip to content

How to have custom menu items with horizontal navigation inside a menu? #3276

Answered by diegohaz
rfgamaral asked this question in Questions
Discussion options

You must be logged in to vote

If we decide to only keep vertical arrow key navigation (as you suggested above), can we achieve the UI presented above without a grid? I'm struggling to understand how exactly to implement that menu. Could you be so kind and provide another code example? Would really appreciate that.

In that case, you don't need anything fancy. Simply use Menu, MenuGroup, and MenuItem and style them appropriately. Essentially, you just apply CSS to display these items horizontally. Something like this:

<MenuGroup style={{ display: "flex" }}>
  <MenuGroupLabel>Zoom</MenuGroupLabel>
  <MenuItem>Make Text Smaller</MenuItem>
  <MenuItem>Make Text Larger</MenuItem>
  <MenuSeparator orientation="vertical" />
  

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@diegohaz
Comment options

Answer selected by rfgamaral
@rfgamaral
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants