Awesome Open Source
Awesome Open Source


Animated hamburger menu icons for React

Hamburger menu icons for React, with CSS-driven transitions. Created to be as elegant and performant as possible. This means no JavaScript animations, no transitions on non-cheap properties and a small size.


npm install hamburger-react


When using one hamburger, ~1.5 KB will be added to your bundle (min + gzip).


Visit the website for full documentation, API and examples. A basic implementation looks as follows:

import Hamburger from 'hamburger-react'
const [isOpen, setOpen] = useState(false)
<Hamburger toggled={isOpen} toggle={setOpen} />

Or without providing your own state:

<Hamburger onToggle={toggled => ...} />

Yet another hamburger library?

Yes. Since the creation of these burgers in 2015 a lot of similar ones have appeared, with one or more of the following downsides:

  • Animations that don't feel natural
  • Transitions on expensive properties (jerky animations)
  • No React support
  • Size (additional dependencies besides React or no tree shaking)
  • Not customizable, or too customizable (no sensible defaults)
  • Doing too much


It is recommended to have a tap/click area of at least 48x48 pixels. Therefore, padding will be added around the icon to create a surface of exactly this size.

Keyboard interaction is provided with the enter key, and the icon element has the recommended accessibility attributes (such as role). You can use the label property to supply an ARIA label for the icon.


The icons are hooks-based, and will work with React 16.8.0 ('the one with hooks') or higher.

Alternatives To Hamburger React
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Typescript (238,077
Reactjs (160,625
Animation (17,567
Icon (15,107
Menu (13,226
Navigation (8,839
Transition (6,127
Accessibility (5,329
Toggle (4,952
Animated (3,909
Sidebar (3,443
Hamburger Menu (138
Burger (37
Hamburger (30
Burger Menu (12