Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hamburger.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hamburger.js

A css-only button that animates from a hamburger-icon to a cross-icon.

  • 0.9.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Hamburger.js

Install

npm install hamburger.js --save

Include CSS and JavaScript

<link href="node_modules/hamburger.js/index.css" rel="stylesheet">
<script src="node_modules/hamburger.js/index.js"></script>

Add html

No label

<button class="hamburger" data-hamburger aria-label="Menu">
    <span class="hamburger-icon"></span>
</button>

Left label

<button class="hamburger" data-hamburger>
    Menu
    <span class="hamburger-icon"></span>
</button>

Right label

<button class="hamburger" data-hamburger>
    <span class="hamburger-icon"></span>
    Menu
</button>

Initialize JavaScript

var buttons = document.querySelectorAll('[data-hamburger]');
for(var i=0; i<buttons.length; i++){
    var button = buttons[i];
    var hamburger = new Hamburger(button);
}

Using sass?

See index.scss for available options

@import "node_modules/hamburger.js/index.scss";


FAQs

Package last updated on 20 Jun 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc