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

@matthesketh/utopia-helmet

v0.7.0

Published

Document head management and favicon generation for UtopiaJS

Readme

@matthesketh/utopia-helmet

Document head management and favicon generation for UtopiaJS.

Install

pnpm add @matthesketh/utopia-helmet

Usage

Head management

import { setHead, useHead } from '@matthesketh/utopia-helmet';
import { signal } from '@matthesketh/utopia-core';

// Static — set once
setHead({
  title: 'Home',
  titleTemplate: '%s | My Site',
  htmlLang: 'en',
  themeColor: '#ffffff',
  meta: [
    { name: 'description', content: 'Welcome to my site' },
    { property: 'og:title', content: 'Home' },
  ],
  link: [
    { rel: 'canonical', href: 'https://example.com/' },
  ],
});

// Reactive — updates automatically when signals change
const title = signal('Home');

useHead(() => ({
  title: title(),
  titleTemplate: '%s | My Site',
  meta: [
    { name: 'description', content: `${title()} page` },
  ],
}));

title.set('About'); // head updates automatically

Favicon generation

Generate adaptive SVG favicons with automatic dark mode support:

import { generateFaviconSvg, generateStaticSvg, generateMaskSvg } from '@matthesketh/utopia-helmet';

// Adaptive favicon (dark mode via prefers-color-scheme)
const favicon = generateFaviconSvg('M', {
  fontFamily: "'DM Mono', monospace",
  bg: '#ffffff',
  fg: '#000000',
  darkBg: '#000000',
  darkFg: '#ffffff',
  radius: 12,
});

// Static variant (for Apple touch icon, no media queries)
const touchIcon = generateStaticSvg('M', {
  bg: '#ffffff',
  fg: '#000000',
});

// Mask icon (monochrome, for Safari pinned tabs)
const mask = generateMaskSvg('M');

Web manifest

import { generateManifest } from '@matthesketh/utopia-helmet';

const manifest = generateManifest({
  appName: 'My App',
  shortName: 'App',
  themeColor: '#ffffff',
  backgroundColor: '#ffffff',
  iconPath: '/icons',
});

// Write to public/site.webmanifest
console.log(JSON.stringify(manifest, null, 2));

Favicon link tags

Generate all the <link> tags needed for a complete favicon setup:

import { faviconLinks, setHead } from '@matthesketh/utopia-helmet';

const links = faviconLinks({
  svgPath: '/favicon.svg',
  appleTouchPath: '/apple-touch-icon.png',
  manifestPath: '/site.webmanifest',
  maskPath: '/mask-icon.svg',
  maskColor: '#000000',
  icon32Path: '/favicon-32x32.png',
  icon16Path: '/favicon-16x16.png',
});

setHead({ link: links });

API

Head management

| Export | Description | | --- | --- | | setTitle(title, template?) | Set document title, optionally with a %s template | | setMeta(descriptor) | Set or update a single <meta> tag | | setLink(descriptor) | Set or update a single <link> tag | | setHtmlLang(lang) | Set the lang attribute on <html> | | setHtmlDir(dir) | Set the dir attribute on <html> | | setHead(config) | Apply a full head configuration (clears previous managed elements) | | useHead(configFn) | Reactive head — re-applies when signals in configFn change | | resetHead() | Remove all helmet-managed elements from <head> |

Favicon generation

| Export | Description | | --- | --- | | generateFaviconSvg(char, options?) | SVG with dark mode via prefers-color-scheme media query | | generateStaticSvg(char, options?) | Static SVG without media queries (for touch icons) | | generateMaskSvg(char, options?) | Monochrome SVG without background (for Safari mask) | | generateManifest(config) | Web app manifest with icon entries | | faviconLinks(options?) | Array of LinkDescriptor for all favicon variants |

Types

| Type | Description | | --- | --- | | HeadConfig | Full head configuration object | | MetaDescriptor | Attributes for a <meta> element | | LinkDescriptor | Attributes for a <link> element | | FaviconConfig | Favicon generation configuration | | WebManifest | Web app manifest structure | | ManifestIcon | Icon entry in a web manifest |

License

MIT