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

@hotosm/tool-menu

v0.2.3

Published

A web component for displaying HOTOSM tool navigation menu.

Downloads

599

Readme

HOT Tool Menu


HOTOSM Tool Menu Web Component

A standalone web component built with Lit that provides a dropdown navigation menu for HOTOSM tools. The menu organizes tools into categories (Imagery, Mapping, Field, Data).

This component is designed to be:

  1. Reusable across all HOT applications
  2. Easy to integrate
  3. Lightweight and framework-agnostic

Features

  • Dropdown menu with grid icon trigger
  • Categorized tools organized by section (Imagery, Mapping, Field, Data)
  • Environment-aware URLs - automatically detects .test domains for development environments
  • Optional tool logos - can show/hide tool icons
  • Multilanguage support - Supports en, es, fr, pt. If the language doesn't exist, it uses English
  • Accessible - includes proper ARIA attributes
  • HOT design system integration - automatically loads HOT design tokens (colors, spacing, typography)
  • Customizable styling via CSS custom properties

Install

npm install @hotosm/tool-menu

or

pnpm install @hotosm/tool-menu

Usage

Via Bundler

Import the component in your JavaScript/TypeScript code:

<script type="module">
  import "@hotosm/tool-menu";
</script>

<hotosm-tool-menu show-logos lang="en"></hotosm-tool-menu>

Via CDN

Use the component directly in HTML:

<!DOCTYPE html>
<html>
  <head>
    <script
      type="module"
      src="https://cdn.jsdelivr.net/npm/@hotosm/tool-menu@latest/dist/tool-menu.esm.js"
    ></script>
  </head>
  <body>
    <hotosm-tool-menu show-logos lang="en"></hotosm-tool-menu>
  </body>
</html>

React

import "@hotosm/tool-menu";

function App() {
  return (
    <div>
      <hotosm-tool-menu
        show-logos={false}
        lang="en"
        onToolSelected={(e) => {
          console.log("Tool selected:", e.detail.tool);
        }}
      />
    </div>
  );
}

API

Properties

| Property | Attribute | Type | Default | Description | | ------------ | ------------ | --------- | ------- | ------------------------------------------------- | | show-logos | show-logos | boolean | false | Whether to display tool logos/icons in the menu | | lang | lang | string | "en" | Language code for section titles (en, es, fr, pt) |

Events

| Event | Type | Description | | --------------- | ----------------------------- | --------------------------------------------------------------------------------------------------- | | tool-selected | CustomEvent<{ tool: Tool }> | Fired when a user clicks on a tool in the menu. The event detail contains the selected tool object. |

Tool Object

interface Tool {
  id: string;
  title: string;
  href: string;
  icon: string;
  section: "imagery" | "mapping" | "field" | "data";
}

Included Tools

The menu includes the following HOTOSM tools:

Imagery

  • Drone Tasking Manager
  • OpenAerialMap

Mapping

  • Tasking Manager
  • uMap

Field

  • Field Mapping Tasking Manager
  • ChatMap

Data

  • fAIr
  • Export Tool

Styling

The component uses Shadow DOM and includes default styles from the HOT Design System. The HOT design tokens (colors, spacing, typography) are automatically loaded by the component.

You can customize the appearance by overriding CSS custom properties or by styling the host element.

CSS Custom Properties

| Property | Description | Default | | ----------------------- | ------------------------------------- | --------------------------- | | --hover-bg | Background color for trigger on hover | var(--hot-color-gray-50) | | --icon-padding | Padding around the trigger icon | var(--hot-spacing-small) | | --icon-margin | Margin around the menu icon | 0 | | --icon-color | Color of the menu icon | var(--hot-color-gray-800) | | --hover-border-radius | Border radius of the trigger | 4px |

Example:

hotosm-tool-menu {
  --hover-bg: #f0f0f0;
  --icon-padding: 8px;
  --icon-margin: 2px;
  --icon-color: #333;
  --hover-border-radius: 8px;
}

License

HOT Tool Menu is free and open source software! You may use any HOT project under the terms of the GNU Affero General Public License (AGPL) Version 3.