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

@neovici/cosmoz-dropdown

v7.5.0

Published

A simple dropdown web component

Readme

@neovici/cosmoz-dropdown

Dropdown components for Neovici applications.

Installation

npm install @neovici/cosmoz-dropdown

Components

cosmoz-dropdown-next

Modern dropdown using the Popover API and CSS Anchor Positioning.

Usage

<script type="module">
	import '@neovici/cosmoz-dropdown';
</script>

<cosmoz-dropdown-next placement="bottom span-right">
	<button slot="button">Open Menu</button>
	<div>Dropdown content</div>
</cosmoz-dropdown-next>

Properties

| Property | Type | Default | Description | | --------------- | --------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------ | | placement | string | 'bottom span-right' | CSS anchor position-area value. See MDN for options. | | open-on-hover | boolean | false | Open on pointer hover. | | open-on-focus | boolean | false | Open when the trigger receives focus. |

Auto-open Modes

The open-on-hover and open-on-focus attributes can be used independently or together:

<!-- Open on hover only -->
<cosmoz-dropdown-next open-on-hover>
	<button slot="button">Hover me</button>
	<div>Content appears on hover</div>
</cosmoz-dropdown-next>

<!-- Open on focus only -->
<cosmoz-dropdown-next open-on-focus>
	<button slot="button">Focus me</button>
	<div>Content appears on focus</div>
</cosmoz-dropdown-next>

<!-- Open on hover or focus -->
<cosmoz-dropdown-next open-on-hover open-on-focus>
	<button slot="button">Hover or focus</button>
	<div>Content appears on either</div>
</cosmoz-dropdown-next>

When auto-open is enabled:

  • The dropdown closes with a 100ms delay to allow moving between trigger and content
  • When open-on-focus is active, clicking the button only opens (does not toggle)
  • Otherwise, click works as a toggle

Slots

| Slot | Description | | --------- | ------------------------------------------- | | button | The trigger element that opens the dropdown | | (default) | The dropdown content |

Events

The dropdown listens for a select event on its content and automatically closes when triggered. This allows menu items to close the dropdown when selected:

menuItem.dispatchEvent(new Event('select', { bubbles: true }));

The dropdown dispatches a dropdown-toggle event (a ToggleEvent) when the popover opens or closes, allowing parent components across shadow boundaries to observe state changes:

dropdown.addEventListener('dropdown-toggle', (e) => {
	console.log(e.oldState, '->', e.newState); // 'closed' -> 'open' or 'open' -> 'closed'
});

Development

npm install
npm run storybook:start

Testing

npm test

License

Apache-2.0