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

@3mo/menu-bar

v0.1.2

Published

Web components for application menu bars, like File, Edit and View, with menubar keyboard and hover behavior.

Readme

Menu Bar

Web components for application menu bars, like File, Edit and View, with menubar keyboard and hover behavior.

npm Documentation

The menus of an application along one bar, like File, Edit and View of a desktop program; navigation belongs in mo-navigation.

Give it an accessible name with aria-label or aria-labelledby.

Installation

npm install @3mo/menu-bar
import '@3mo/menu-bar'

Usage

<mo-menu-bar aria-label='Editor'>
	<mo-menu-bar-item>
		File
		<mo-menu slot='menu'>
			<mo-menu-item icon='note_add'>New</mo-menu-item>
			<mo-menu-item icon='save'>Save</mo-menu-item>
			<mo-menu-item icon='print'>Print</mo-menu-item>
		</mo-menu>
	</mo-menu-bar-item>
	<mo-menu-bar-item>
		Edit
		<mo-menu slot='menu'>
			<mo-menu-item icon='undo'>Undo</mo-menu-item>
			<mo-menu-item icon='redo'>Redo</mo-menu-item>
		</mo-menu>
	</mo-menu-bar-item>
	<mo-menu-bar-item>
		Help
		<mo-menu slot='menu'>
			<mo-menu-item icon='help'>Documentation</mo-menu-item>
			<mo-menu-item icon='info'>About</mo-menu-item>
		</mo-menu>
	</mo-menu-bar-item>
</mo-menu-bar>

Examples

  • Menu Content — The menus take what any mo-menu does: submenus, selectable items and separators.
  • Disabled — A disabled item fades and does not open its menu.
  • Overflow — Resize the container: menus that do not fit are hidden and skipped by the cursor, and overflowChange reports it.
  • Parts — The trigger part of each item can be restyled from outside.
  • With Controller — MenuBarController applies the pattern to items of your own, here plain buttons rendered by a custom component.

Accessibility

A menubar whose items are none, with the button of each a menuitem and each item's menu a menu. The bar is one tab stop.

| Key | Does | | --- | --- | | ArrowRight ArrowLeft, Home End | The next, previous, first or last item. | | A letter | Typeahead by the items' labels. | | ArrowDown Enter Space | Opens the item's menu on its first item; ArrowUp on its last. | | ArrowRight ArrowLeft | While a menu is open: opens the neighbouring menu instead, as a pointer moving over the items does. |

Items that do not fit the bar are hidden and skipped; the bar reports them with overflowChange, so offer them another way. Name the bar with aria-label.

API

mo-menu-bar

Properties

| Name | Attribute | Type | Default | Description | | --- | --- | --- | --- | --- | | hasOverflow | | boolean | | Whether some items do not fit. Those carry data-overflowed and are hidden. |

Events

| Name | Detail | Description | | --- | --- | --- | | overflowChange | boolean | Dispatched when hasOverflow changes. |

Slots

| Name | Description | | --- | --- | | (default) | The items, which are mo-menu-bar-items. |

mo-menu-bar-item

One menu of a mo-menu-bar: a trigger and the menu it opens, which is anchored to the trigger.

Properties

| Name | Attribute | Type | Default | Description | | --- | --- | --- | --- | --- | | label | | string | | The trigger's text, matched by typeahead. | | disabled | disabled | boolean | false | Whether the menu can be opened. |

Slots

| Name | Description | | --- | --- | | (default) | The trigger's content, usually its label. | | menu | The menu this item opens. |

CSS parts

| Name | Description | | --- | --- | | trigger | The button which opens the menu. |

Links

License

MIT © 3MO GmbH