Menu questions : align whole menu right; include search bar; responsive

I’m testing webix and have some questions on menus.

  1. I would like a header line in my application, to have some image and text to the left, and the menu to be aligned right on the screen. The menu should take no more space than it needs, and the rest of the width available for the
    to the left containing image & text. Is this possible?

Currently, I have this: http://webix.com/snippet/7de1ae92 - but I just want the menu over to the right. I’m sure it’s simple!

  1. I would like to include other elements in my menu, for example a search box. Is this possible.

  2. If the screen width isn’t wide enough, can I collapse down my menus to (a) just an icon/image for each, or (b) a single icon (e.g. hamburger symbol) which will then open the menu?

(1) check http://webix.com/snippet/953e30a3
(2) there is no such default logic, it possible to define two different configs ( for wide menu and for narrow menu ) and show the necessary one based on device resolution.

Hi Maksim

Thanks for this response. So can I assume that there is no way for the menu to ‘know’ how wide it is, and allow the rest of the row to size accordingly? You’ve placed the width:260, but in reality, the width of the menu might be something different, depending on what it contains that time. Is there no way to have the menu auto-size to the width of its contents?

Also - there was a question there about other elements, e.g. to include a search box in the menu. Is that possible?

thanks

There are two modes which can be enabled

a) you define the total width for a menu, and it sizes each button to the correct width

b) you define the width for a single menu item, and menu will size self to fit all menu items ( but each item has a fixed width )

There is no way to size menu to the text content currently.

to include a search box in the menu. Is that possible

Actually it was in the above snippet, click Menu1 item to see the search box.

I see, thanks. Maybe sizing menu to the text content could go on your roadmap? :slight_smile:

thanks for your responses!

Yep, we have it in our plans, will be available in Webix 3.0 or Webix 3.1