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

@jasonrundell/react-mega-menu

v2.2.2

Published

A React project which aims to be an accessible, responsive, boilerplate top navigation menu with a "Mega Menu"!

Downloads

54

Readme

React Mega Menu

A React project which aims to be an accessible, responsive, boilerplate top navigation menu with a "Mega Menu"!

Features

  • WCAG 2.1 AA compliant
  • W3C valid markup
  • Fly-out menus
  • Supports keyboard navigation and screen readers
  • Responsively designed to adapt to modern mobile and desktop screen sizes
  • Lightly styled with Emotion
  • Supports theme customization with vanilla CSS, as demonstrated in the synthwave.css theme
  • Tested and supported on Edge, Safari, Firefox, and Chrome
  • Includes CSS animations that respect the prefers-reduced-motion media query for users who prefer reduced motion
  • Includes a demo project using Next.js, showcasing how to integrate the menu with a Next.js application

FAQ

  • What is a "Mega Menu"? A Mega Menu is a large dropdown navigation menu that displays multiple links and categories at once. It often organizes content into columns or sections, allowing users to see a broader range of options at a glance. It is typically used for websites with a lot of content or categories, like e-commerce or large informational sites.
  • Why would someone use a Mega Menu? Mega menus are important for building an online e-commerce presence because they enhance navigation by allowing users to quickly browse and access a wide range of products or categories. They help improve the user experience by organizing complex inventories into clear, accessible sections, reducing the time it takes for customers to find what they're looking for, which can lead to higher engagement and conversion rates.
  • Can I use this just for a simple website menu? Yes! This project is designed to be flexible and can be used for any type of website navigation. You can customize the menu to fit your needs, whether you want a simple dropdown menu or a more complex Mega Menu.

View Demo

Visit: https://jasonrundell-react-mega-menu.vercel.app/

Deploy

Vercel

Deploy with Vercel

Special Thanks

Donna Vitan for the accessibility consultation

Resources

Web Accessibility Tutorials (WCAG) Menu Structure

Web Accessibility Tutorials (WCAG) Fly-out Menus

JavaScript Event KeyCodes by Wes Bos

Supporting the Keyboard for Mobile

a11y Project: Resources

Accessible Menus

Deque University

"Building Accessible Menu Systems" by Heydon Pickering

Using the aria-hidden Attribute

Reduced Motion Support

Learn by reading these:

How to Test prefers-reduced-motion on macOS

  1. Open settings for Accessibility
  2. Toggle Reduce Motion On/Off

How to Test prefers-reduced-motion on iOS

  1. Open settings for Accessibility
  2. Toggle Reduce Motion On/Off

How to Test prefers-reduced-motion on Windows 10

  1. Press the Win+R keys to open Run, type SystemPropertiesPerformance.exe into Run, and click/tap on OK to directly open to the Visual Effects tab in Performance Options.
  2. Check (enable - default) or uncheck (disable) Animate controls and elements inside windows.
  3. If you don't see an immediate change, then you can restart the explorer process or sign out and sign in to apply instead.

How to Test prefers-reduced-motion on Android

  1. Search in your system settings for Remove Animations and toggle On/Off, or
  2. Go to your system settings > Accessibility and look for a toggle to reduce motion or turn off animations
  3. If you have a browser app already open, you'll have to force quit it to have the setting take effect

Icons

Icons from the Free for Web download pack by Font Awesome