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 🙏

© 2026 – Pkg Stats / Ryan Hefner

responsive-ant-menu

v2.0.5

Published

A lightweight React component for Ant Menu to support responsive behaviour.

Readme

Responsive Ant Menu

A lightweight React component for Ant Menu to support responsive behaviour.

Motivation

Having an option for Ant's Menu component to hide under a customizable element when viewing on a mobile device.

Interactive Demo

https://itskemo.github.io/responsive-ant-menu/

How to use

  1. npm i responsive-ant-menu
  2. Optional: Configure your project to use Modularized Ant (otherwise you have to import the styles manually)

Sample Usage

import React from 'react';
import ResponsiveAntMenu from 'responsive-ant-menu'
import { Menu } from 'antd';
// include Menu & Popover styles if not not using Modularized Ant (see How to Use)
// import 'antd/lib/menu/style/css';
// import 'antd/lib/popover/style/css';

const Nav = () => (
    <ResponsiveAntMenu
        activeLinkKey={location.pathname}
        mobileMenuContent={isMenuShown => isMenuShown ? <button>Close</button> : <button>Open</button>}
        menuClassName={'responsive-ant-menu'}
    >
        {(onLinkClick) =>
            <Menu>
                <Menu.Item key='/' className={'menu-home'}>
                    <a onClick={onLinkClick} href={'/#'}>Home</a>
                </Menu.Item>
                <Menu.Item key='/#foo'>
                    <a onClick={onLinkClick} href={'/#foo'}>Foo</a>
                </Menu.Item>
                <Menu.Item key='/#bar'>
                    <a onClick={onLinkClick}  href={'/#bar'}>Bar</a>
                </Menu.Item>
            </Menu>
        }
    </ResponsiveAntMenu>
);

export default Nav;

Props

Name | Type | Default | Desc ---- | ---- | ------- | ---- mobileMenuContent | HTML | - | Required! Custom content to be show when the viewport size hits mobileBreakPoint. Supply custom HTML markup. If a function is supplied, isMenuShown is passed as an argument to be used for even more customization eg. mobileMenuContent={isMenuShown => isMenuShown ? <button>Close</button> : <button>Open</button>} to show different content. activeLinkKey | string | - | Pass either location.pathname or React Routers path string to mark Menu.Item with matching key prop as active mobileBreakPoint | number | 575 | Whenever the size of the viewport gets equal to or less than passed value, display Mobile version toggle. Value is in px. throttleViewportChange | number | 250 | Throttle the callback calls whenever the viewport is re-sized. Value is in milliseconds. mode | 'vertical', 'horizontal' | 'horizontal' | Allows to switch to either horizontal or vertical version of Ant's menu implementation. theme | 'light', 'dark' | 'light' | Allows to set a theme of Ant's Menu component. If a function is passed, isMobile argument is supplied to implement custom logic, eg. theme={isMobile => isMobile ? 'dark' : 'light'} placement | string | 'bottom' | Allow to use various positions for Popover component, for more info, see: Ant Design: Popover closeOnClick | boolean | true | Close the Mobile menu once the link is clicked menuClassName | string | - | Add a custom CSS class to the Ant's Menu component popoverTrigger | string | 'click' | Allows to define a trigger type to show the Mobile Menu. Accepted values are 'click', 'hover', 'focus'