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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hotosm/ui

v0.3.4-b3

Published

Shared UI components with HOT theming.

Readme

HOT Shared UI


Shared UI Components with HOT Theming

This repository contains advice on how to use the WebAwesome Web Components library, references to the HOTOSM style guide, and a few 'wrapper' components to assist development:

  1. Reduced code duplication across HOT tools (we repeat a lot!)
  2. Simplified developer experience to create a HOT app.
  3. Reasonably consistent theming and style across tools.

The main goal of this project is not to re-invent the wheel, or add an extra burden of development and maintenance. It should include a minimal number of components, such as:

  • Header, including auth flows (OSM, Google) and login info.
  • Sidebar with links to extra resources.
  • Footer with links.

Quick start

Current HOTOSM UI version used: 0.3.1-b5 Current WebAwesome version used: 3.0.0-beta.1

Install WebAwesome

pnpm install "@awesome.me/[email protected]"

[!NOTE] It's important to pin the version of web awesome used to the version in this library, to avoid any conflicts and incompatibilities between components.

Install HOT Components

pnpm install "@hotosm/ui"

Configure The Styles

In your index.html or equivalent frontend root, add the following classes to your <html> block:

<!DOCTYPE html>
<html class="wa-theme-default wa-palette-hotosm wa-brand-red wa-neutral-gray
  wa-success-cyan wa-warning-yellow wa-danger-orange">
  <head>
    xxx
  </head>
  <body>
    xxx
  </body>
</html>

[!IMPORTANT] These classes determine the colour usage for different component variants, and probably should not be changed!

And import the required styles in your main.ts or equivalent (we import from package rather than CDN, to allow the bundler to work its CSS tree-shaking magic).

import '@hotosm/ui/dist/style.css';

If you wish to use any of the variables in hot.css manually, you can reference them as variables like so:

/* In your CSS file */
some-param: var(--hot-some-param);
/* See all variables in the `theme/hot.css` file */

Use The Components

Via Bundler

Import each component individually into your code:

<script>
  import '@hotosm/ui/dist/components/header/header.js';
</script>

<hot-header
  param1=""
  param2=""
>
</hot-header>

Via CDN

If you are working directly in HTML, or other ways without a configured bundler, you can import all the components as a bundle, as use them like so:

<script>
  import '@hotosm/ui/dist/style.css';
  import '@hotosm/ui/dist/hotosm-ui';
</script>

<hot-header title="Test App" size="small" showLogin="false"></hot-header>

React

Import in the same way as the bundler example above, except events are bound to slightly differently:

<hot-header
  title="Test App"
  size="small"
  showLogin="false"
  onLogin={() => {
    console.log('handler');
  }}
></hot-header>

Component Guides

  • Header: see /header.md for detailed integration, styling, and framework examples.

How to contribute

  • Clone the project git clone [email protected]:hotosm/ui.git
  • Install dependencies pnpm install
  • Run the storybook pnpm run dev
  • Write code!

For styling, check /theme:

  • hot.css has a HOT theme, used across HOT components.
  • hot-wa-override.css has a WebAwesome theme, re-defining style variables.

License

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