cyntler/hamburger-react
cyntler/hamburger-react has 1,036 GitHub stars and 41 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 11:48 UTC. Last push 2024-12-22.
Animated hamburger menu icons for React.js weighs only 1.5 KB.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
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.
Installation
npm install hamburger-react
Size
When using one hamburger, ~1.5 KB will be added to your bundle (min + gzip).
Usage
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
Accessibility
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.
Support
The icons are hooks-based, and will work with React 16.8.0 ('the one with hooks') or higher.
Explore related projects
ytdl-org/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
141,500 starsexcalidraw/excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
135,396 starsgodotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
119,840 starsmrdoob/three.js
JavaScript 3D Library.
117,905 stars