All Projects → thednp → navbar.js

thednp / navbar.js

Licence: MIT license
Modern Navigation Component

Programming Languages

SCSS
7915 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
typescript
32286 projects

Projects that are alternatives of or similar to navbar.js

bsnav
An extended Bootstrap 4 menu with a bunch of utilities
Stars: ✭ 90 (+91.49%)
Mutual labels:  navigation, navbar, menu
Hc Offcanvas Nav
JavaScript library for creating toggled off-canvas multi-level navigations, allowing endless nesting of submenu elements, supporting swipe gestures, keyboard interactions and ARIA attributes.
Stars: ✭ 201 (+327.66%)
Mutual labels:  navigation, menu
React Site Nav
A kick ass site menu powered by styled components inspired by Stripe.
Stars: ✭ 155 (+229.79%)
Mutual labels:  navigation, menu
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+5648.94%)
Mutual labels:  navigation, menu
Quickmenu
The new era of mobile navigation for the web, we're out of hamburgers.
Stars: ✭ 119 (+153.19%)
Mutual labels:  navigation, menu
React Command Palette
An accessible browser compatible javascript command palette
Stars: ✭ 140 (+197.87%)
Mutual labels:  navigation, menu
Dropdownmenukit
UIKit drop down menu, simple yet flexible and written in Swift
Stars: ✭ 246 (+423.4%)
Mutual labels:  navigation, menu
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+3170.21%)
Mutual labels:  navigation, navbar
SidebarOverlay
Yet another implementation of sidebar menu, but here your menu appears over the top view controller.
Stars: ✭ 66 (+40.43%)
Mutual labels:  navigation, menu
navigator
🧿 Build navigation or menu for Laravel and Awes.io. Unlimited complexity and depth, with permissions and sorting support.
Stars: ✭ 47 (+0%)
Mutual labels:  navigation, menu
angular-scrollspy
A simple lightweight library for Angular which automatically updates links to indicate the currently active section in the viewport
Stars: ✭ 34 (-27.66%)
Mutual labels:  navigation, navbar
Draggablemenu
A draggable menu that shows a thumbnail preview of an image grid
Stars: ✭ 117 (+148.94%)
Mutual labels:  navigation, menu
Pushy
Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions.
Stars: ✭ 1,488 (+3065.96%)
Mutual labels:  navigation, menu
Layerjs
layerJS: Javascript UI composition framework
Stars: ✭ 1,825 (+3782.98%)
Mutual labels:  navigation, menu
Bootstrap Dropdown Hover
Bootstrap based responsive mulltilevel dropdown navigation menu with fascinating animations
Stars: ✭ 115 (+144.68%)
Mutual labels:  navigation, menu
Mmenu Js
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.
Stars: ✭ 2,535 (+5293.62%)
Mutual labels:  navigation, menu
Eeh Navigation
An AngularJS menu module.
Stars: ✭ 74 (+57.45%)
Mutual labels:  navigation, menu
Promotion Menu
RubyMotion gem allowing you to easily setup a facebook or Path style hidden slide menu easily with the ProMotion gem.
Stars: ✭ 78 (+65.96%)
Mutual labels:  navigation, menu
vue-bottom-navigation
Vue bottom navigation
Stars: ✭ 56 (+19.15%)
Mutual labels:  navigation, menu
Accordion
Silky-smooth accordion widgets with no external dependencies.
Stars: ✭ 32 (-31.91%)
Mutual labels:  navigation, menu

Navbar - Modern Navigation Component

Coverage Status ci NPM Version NPM Downloads jsDeliver cypress version typescript version

The mobile first menu navigation for today's modern web, developed with ES6+ JavaScript, TypeScript definitions and packed with lots of features.

Demo

Download the package and check the docs folder, or check it online here.

Navbar Highlights

  • Mobile First Design
  • Accessibility Focus
  • ES6+ sources with TypeScript definitions and powerful build tools
  • SCSS sources with powerful mixins and CSS variables
  • very light footprint, 5kb in size when minified
  • 3 sets of positions top (main), left or right
  • provides a set of options for JavaScript initialization
  • DATA API allows you to automatically initiate without JS invocation
  • modern browsers supported and semi-modern alike with a special polyfill for IE10+ provided

How It Works

On mobile

  • uses the native events behavior, it requires some elements to click on
  • shows the <button class="navbar-toggle"> element for element visibility toggle
  • menu items have a <button class="subnav-toggle"> element that enables visibility of the submenus
  • makes use of the open-mobile class to toggle submenus via the click handler

On the desktop

  • hides mobile specific elements and changes event behavior to mouse hover
  • opens submenus on mouseenter, by adding open and open-position classes to the menu item, in rapid succession
  • hides submenus on mouseleave, by removing the above classes in a delayed succesion

On both mobile and desktop, Navbar.js allows for full keyboard navigation via the TAB and SPACE keys. In addition, directional arrows provide navigation on desktop with RTL support.

NPM

You can install this through NPM:

$ npm install @thednp/navbar

Browser Usage

Download the latest package. unpack and inspect the contents. You need to copy the navbar.js and navbar.css or their minified variations to your app assets folders as follows. Link the required CSS in your document <head> tag

<link href="../assets/css/navbar.css" rel="stylesheet">

Link the required JS in your document <body> tag, though it should work in the <head> as well

<script src="../assets/js/navbar.js"></script>

Initiate the function for your elements at the end of your <body> tag

<script>
var myMenu = new Navbar('selector');
</script>

To use the DATA-API, you need to provide the data-function="navbar" attribute to your navbar, like so:

<nav class="navbar" data-function="navbar">
  <a href="#" title="App Name">Brand Name</a>
  <button class="navbar-toggle">
    <i class="menu-icon"></i>
  </button>
  <div>
    <ul class="nav">
      <li><a href="#">Link Title</a></li>
      <li><a href="#">Another Link Title</a></li>
    </ul>
  </div>
</nav>

Alternatively you can use only the menu itself and use the specific attribute:

<div class="sidebar">
  <ul class="nav" data-function="navbar">
    <li><a href="#">Link Title</a></li>
    <li><a href="#">Another Link</a></li>
  </ul>
</div>

Other initialization and markup options apply, explained in the demo.

ES6+

import Navbar from '@thednp/navbar'

let myNav = new Navbar('#myNav')

Node

// get and store it
var Navbar = require("@thednp/navbar");

// initialize it
var myMenu = new Navbar('#myNav');

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].