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

@carlosfrontend/dropdownme

v1.0.2

Published

A lightweight and simple dropdown generator

Downloads

1

Readme

@carlosfrontend/dropdownme

Dynamic User Interface Interactions

JavaScript Course The Odin Project

This package was developed as an exercise for The Odin Project. It's pretty lightweight and allows you to add as many animated dropdown menus as you need.

HTML

  1. The first thing you need is to copy and paste this codeblock container into your body tags:

    index.html

    <body>
      <nav id="navbar">
        <!-- Dropdonws will goes here  -->
      </nav>
    </body>
  2. Each block with the .parentContainer class is a dropdown menu. You can add by copying and pasting as many as you need at you navbar container:

    index.html

    <nav id="navbar">
      <!-- Start of the first dropdown -->
    
      <div class="parentContainer">
        <div class="parentItem">Home</div>
        <div class="itemsContainer">
          <div class="dummy-item"></div>
          <div class="item">One</div>
          <div class="item">Two</div>
          <div class="item">Three</div>
        </div>
      </div>
    
      <!-- End of the first dropdown -->
    
      <!-- Start of the second dropdown -->
    
      <div class="parentContainer">
        <div class="parentItem">Services</div>
        <div class="itemsContainer">
          <div class="dummy-item"></div>
          <div class="item">One</div>
          <div class="item">Two</div>
          <div class="item">Three</div>
          <div class="item">Four</div>
        </div>
      </div>
    
      <!-- End of the second dropdown -->
    </nav>

Advice

  1. The only requirement is not to change the name of the nav id and the name classes. You can replace the rest of the text with whatever you want. You can even add more tags with the html tag if you need more elements:

    <div class="item">New Item</div>

Javascipt

  1. Install it as a dependency in your project with this terminal command:

    npm i @carlosfrontend/dropdownme
  2. Make sure you import it into your project's javascipt file and call the function to animate the dropdown:

    index.js

    import dropDownMe from "@carlosfrontend/dropdownme";
    dropDownMe();

Link:

:white_check_mark: Assigments :blue_book:

:white_check_mark: Live Preview :computer:

Feel free to change the styles as you like.

Happy Coding!! :coffee: :rocket: