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

@gemeente-denhaag/menu

v0.2.3

Published

A Menu component

Downloads

925

Readme

Introduction

npm (scoped) GitHub Workflow Status (branch)

Menu buttons are used as navigational elements. They appear in the navigation and open a menu or page.

When to use

Use menu buttons in the menu to navigate to a page or open a menu.

Alternatives and related components

  • Use links for navigation actions that appear within or immediately after a sentence.
  • Use buttons for actions that don’t appear within or directly following a sentence.

Anatomy

The menu button consists of:

  1. Label: communicates what is being linked to

  2. Icon (optional): this icon shows that the menu button is expandable

(Interactive) states

The menu button contains the states inactive, active, hover and focus.

Design properties

Typography

  • Label inactive: TheSans/md/40*
  • Label active: TheSans/md/700

Colors

  • Label: text color Grey/4
  • Icon: svg color Grey/4

Interactive states

  • Active: label text color Blue/3
  • Hover: label text color Blue/3
  • Focus: label border color Ocher/5

Structure

  • Label: padding-block 20px
  • Icon: height and width 24px, padding-left 4px
  • Menu buttons: group spacing 40px

Accessibility

TODO: [ technical requirements ]

Content guidelines

  • Menu buttons need to be clear and predictable. Users should be able to anticipate where they will go when they select a button.

  • Always capitalize menu button labels, meaning that the first word is uppercase and the rest is lowercase (unless a term has its own name).

  • Labels should be short and sweet, with a maximum of 2 words.

  • Make labels easy to scan.

  • Figure out what users are looking for, and use category labels that are familiar and relevant. Menus are not the place to get cute with made-up words and internal jargon. Stick to terminology that clearly describes your content and features.

  • Avoid generic labels such as "Articles" or "Videos." Such labels aren’t descriptive because they tell visitors the format of the content, but not the topic.

Best practices

Do's

Menu buttons must:

  • Have a maximum of 5 visible buttons. The other menu items must be placed under 'More'. The more options you have in your navigation, the more difficult the information is to remember and process for your visitors.

  • Have a clear navigation location.

  • Have a logical order. You might want to sort the options by priority — start with top priority and end with the least important option.

Don'ts

Menu buttons must:

  • Not create information overload.

  • Not have too many buttons, because options make the next step unclear.

  • Not be visible if they are not valuable for the user

References

https://www.nngroup.com/articles/menu-design/ https://forgeandsmith.com/blog/website-navigation-ux-best-practices https://xd.adobe.com/ideas/process/information-architecture/website-navigation-design-best-practices/