Giter Club home page Giter Club logo

obscuredetour / simply-nav Goto Github PK

View Code? Open in Web Editor NEW
42.0 3.0 9.0 302 KB

Simple lightweight & fully responsive mobile navigation built with flexbox and vanilla JavaScript

Home Page: https://obscuredetour.github.io/simply-nav/

License: MIT License

CSS 32.77% HTML 32.18% JavaScript 5.67% SCSS 29.39%
javascript css sass flexbox responsive navigation vanilla-javascript customizable mobile-navigation navbar navigation-component navigation-drawer navigationbar

simply-nav's Introduction


Maintained? Last commit Version info

Simply Navigation

This is a dead simple lightweight navigation built with flexbox and vanilla JavaScript

Demo it here https://obscuredetour.github.io/simply-nav/

Read the Documentation for how to use and relevant information.

Version 1.2.0 delivered tons of new features and a rewrite from the ground up!

Version 1.3.0 release introduces Left & Right side layout support and Accessibility updates. Read more here.

Features

  • No dependencies.
  • Fully responsive.
  • Built using Flexbox & vanilla JavaScript only.
  • Easy close mobile menu. Closable via the close X button and the alt-side page overlay.
  • Mobile menu closes when link is selected. Useful so the mobile user doesn't have to close the menu after choosing a link. Try by opening the mobile menu and selecting 'Example'.
  • Menu button animates to a close 'X' button. Thanks animated-burgers
  • Mobile menu scrollable (if its content goes beyond the screen). Page and body are not scrollable.
  • Rewritten using SCSS with RCSS guidelines.

Customizable

  • Breakpoint variable - default at 800px.
  • Sticky navigation bar available.
    • To enable a fixed nav bar, add class -sticky to the nav-main element.
  • Traditional or offset hamburger menu icons.
    • For traditional menu button, remove the -offset class from the burger element.
  • Bottom mobile nav bar option.
    • To enable the bottom mobile nav bar, add classes -bottom & -sticky to the nav-main element.

How to use

Clone or download the repository to build a static website. Or alternatively insert the respective files into your project.

  • simply-nav.js - has all necessary JS functions
    • File can be placed into your project or the anonymous function inside can be pasted into an existing JS file or <script> tag within an HTML file.
  • nav.css - has all necessary CSS styles for the navigation
    • File can be placed into your project or pasted into an existing CSS file or <style> tag within an HTML file.
  • Markup structure can be found in index.html
    • The nav-main element contains all necessary markup for Simply Navigation to function.
  • Standalone HTML file will be making a comeback in a future version.

Sass files provide for best customizability.

Support

Tested on the latest 2 versions of the following browsers:

Desktop

Firefox, Chrome, Edge, Safari

Mobile

Android - Chrome, Firefox iOS - Safari

simply-nav's People

Contributors

obscuredetour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

simply-nav's Issues

Positioned to the right

Hey, thanks for wonderful library.

How hard will it be to add support for the right side menu? I.e. Icon should be on the right, and list appearing from the right?

(Another option I would love to have is to have full width menu – good for very small screen, but that's probably another request)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.