npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

menu-full

v1.1.1

Published

Website menu - Full Nav Menu

Downloads

16

Readme

Full Nav Menu

This is the basic "full-menu" version and does not contain additional modules and settings. If you want to get the full version with settings and modules, then use the npm i -D full-menu package. Here is a link to npm => "full-menu" and to the GitHub repository "full-menu".

If you are looking for a library to create a complete menu for your site, then "menu-full" might be a great choice for you. This library provides an easy and convenient way to create beautiful and functional menus on your web pages.

One of the features of "menu-full" is its ease of use. No special programming knowledge is required to create a menu, as the library provides a simple and intuitive interface. All you need to do is just install the npm package and add it to your project. In your navigation menu, add the nav-menu class and then our script will do the rest. You can create menus with unlimited nested items, dropdowns, animations and more.

If you want to add a navigation menu to your site, you can do so with our "menu-full" library, which can be installed into your project via npm or downloaded from our GitHub repository.

This menu works on any device and works both on hover and on click, so you can be sure that the user will open this menu on any site. It also thought out all the user actions that help to work with this menu.

Here is an example of what your html code might look like:
      <nav class="nav-menu">
        <ul>
          <li>Home</li>
          <li>Catalog
            <ul>
              <li>Category
                <ul>
                  <li>Products</li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
      </nav>

Our JavaScript will add all the necessary classes to your menu so that you can do CSS-only styling of your menu however you want. It adds extra classes as soon as the submenu appears in your html so you don't have to worry about automating the process. It will automatically assign an extra class to the nav (nav-sub-menu) which will mean the menu contains a submenu, it will also assign the li which contains the submenu the class nav-menu-li and wrap your li content in a span with the class nav-menu-span , will additionally assign the class nav-menu-ul to the nested ul element. On click or hover, the active class will be added and removed for the nav-menu-li, av-menu-span, nav-menu-ul elements, allowing you to customize any behavior of the menu.

Here is how the same code will look like after being processed by our script:
     <nav class="nav-menu nav-sub-menu">
        <ul>
          <li>Home</li>
          <li class="nav-menu-li">
           <span class="nav-menu-span">Catalog</span>
            <ul class="nav-menu-ul">
              <li class="nav-menu-li">
              <span class="nav-menu-span">Category</span>
                <ul class="nav-menu-ul">
                  <li>Products</li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
      </nav>

Our "menu-full" library has a fast and optimized code that guarantees fast loading of your website. This makes our JavaScript a great choice for sites of any size and scale. Install right now and see the simplicity and quality of our code.

Connecting via npm
npm i -D menu-full
Connecting to the project
import navMenu from 'menu-full';
navMenu();

The "menu-full" library is a great choice for those who are looking for an easy, fast and flexible way to create a complete menu on their website. With it, you can quickly create a beautiful and functional menu that will work on all devices and match your design.

Here is an example of basic SASS for your menu
nav.nav-menu.nav-sub-menu ul > li > ul.active {
	opacity: 1;
	visibility: visible;
	@media (max-width: 768px) {
		display: block;
	}
}
nav.nav-menu.nav-sub-menu ul > li > ul > li > ul.active {
	display: block;
}

nav.nav-menu.nav-sub-menu {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-weight: 16px;
	font-style: normal;
	line-height: normal;
	letter-spacing: rem(1);
	color:#232b32;
	a {
		color: #232b32;
		&:hover {
			color: #a41111;
		}
		&:active {
			color: #a41111;
		}
	}

	& > ul {
		display: flex;
		flex-wrap: wrap;
		flex-direction: row;
		justify-content: flex-start;
		align-content: flex-start;
		align-items: left;
		gap: 5px 10px;
		text-align: left;
		@media (max-width: 768px) {
			flex-direction: column;
			width: 100%;
		}
	}

	& > ul > li > ul {
		opacity: 0;
		visibility: hidden;
		position: absolute;
		top: 95%;
		left: 0;
		width: 300px;
		padding: 10px 0 0 0;
		@media (max-width: 768px) {
			display: none;
			position: relative;
			top: 0;
			padding: 5px 0 5px;
			width: 100%;
		}
	}

	& ul > li > ul > li > ul {
		display: none;
	}

	li {
		position: relative;
		cursor: pointer;
		@media (max-width: 768px) {
			width: 100%;
		}
	}

	ul > li > ul > li {
		background-color: #d1effc;
		padding: 0 10px 5px 10px;
		&:first-child {
			padding: 5px 10px 5px 10px;
		}
		&:last-child {
			padding: 0 10px 5px 10px;
		}
		&:only-child {
			padding: 10px 10px 10px 10px;
		}
	}

	ul > li > ul > li > ul > li {
		padding: 0 0 5px 5px;
		&:first-child {
			padding: 5px 0 5px 5px;
		}
		&:last-child {
			padding: 0 0 0 5px;
		}
		&:only-child {
			padding: 5px 0 0 5px;
		}
	}

	ul > li > ul > li > ul > li > ul > li {
		padding: 0 0 5px 0;
		&:first-child {
			padding: 5px 0 5px 0;
		}
		&:last-child {
			padding: 0 0 0 0;
		}
		&:only-child {
			padding: 5px 0 0 0;
		}
	}

	span.nav-menu-span {
		display: block;
		position: relative;
		padding: 0 25px 0 0;
		&::after {
			content: "⬇️";
			position: absolute;
			top: -2px;
			right: 0;
			width: auto;
			height: auto;
		}
		&.active {
			&::after {
				content: "⬆️";
			}
		}
	}
	
	& > ul > li > span.nav-menu-span {
		@media (max-width: 768px) {
			margin: 0 10px 0 0;
		}
	}

}

You can modify this SASS to suit your needs as you wish.


  • Author: WikiOur
  • Author website: https://wikiour.com
  • GitHub: https://github.com/wikiour
  • Patreon: https://patreon.com/wikiour
  • YouTube: https://youtube.com/@wikiour
  • Facebook: https://facebook.com/wikiour
  • Instagram: https://instagram.com/wikiour