Bulma: Hamburger menu only available on right hand side

Created on 14 Feb 2018  路  4Comments  路  Source: jgthms/bulma


This is about Bulma version 0.6.2.



Overview of the problem

The hamburger menu which is nested inside navbar-brand only appears on the right hand side of the navbar. It is common to see the hamburger menu on the left side in a mobile app. It would be nice to have that as an option.

Hamburger






Steps to Reproduce

Adding navbar-burger as direct child of navbar-brand:
image

<button class="button navbar-burger">
  <span></span>
  <span></span>
  <span></span>
</button>

Expected behavior

navbar-burger could appear as first item on mobile when given a class, e.g. navbar-burger-left

image

<button class="button navbar-burger-left">
  <span></span>
  <span></span>
  <span></span>
</button>

Not sure on naming convention :-D

as far as I can tell it would just need the margin-left to be removed:
image

Actual behavior

It only appears on the right

pinned

Most helpful comment

at this point, I moved the burger a bit higher position to have the expected behavior. it would be nice if we can have this flexibility :)

image

image

All 4 comments

I am aware there's a big UX debate on where hamburgers should be and if we should use them at all.

Just curious to hear the reasoning behind this if anything.

at this point, I moved the burger a bit higher position to have the expected behavior. it would be nice if we can have this flexibility :)

image

image

An issue I recently ran into... I'd like to use a second nav-bar under the main one for a toolbar... In mobile, I'd like to change the hamburger and move it opposite of the top nav.

Options to position the toggle would be welcome.

This is exactly the issue I'm having -- I'm a left-handed mobile user, so a right-sided hamburger menu is suboptimal. I'll be implementing swiping as well for my nav drawer, but I don't think hamburgers are going away anytime soon.

I was able to get close enough by adding a new class to my navbar-brand and moving the burger to be the first element, but YMMV, I don't have anything other than the brand on this menu.

.navbar-brand.left-burger {
    align-items: flex-start;
}

.navbar-brand.left-burger .navbar-burger {
    margin-left: 0;
    margin-right: 0;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

JenCant picture JenCant  路  3Comments

Laraveldeep picture Laraveldeep  路  3Comments

fundon picture fundon  路  3Comments

choonggg picture choonggg  路  3Comments

guillecro picture guillecro  路  3Comments