
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
hamburger-react
Advanced tools
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 => ...} />
Yes. Since the creation of these burgers in 2015 a lot of similar ones have appeared, with one or more of the following downsides:
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.
FAQs
Animated hamburger menu icons for React
We found that hamburger-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.