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

inline-logo

v0.1.0

Published

Replace text with brand logos inline — selectable, copyable, accessible.

Readme

inline-logo

Replace text with brand logos inline — the text stays selectable, copyable, and accessible to screen readers.

Works with any image format: SVG, PNG, JPG, WebP, GIF, base64 data URIs.

npm version license

Framework bindings available: inline-logo-react · inline-logo-vue

Usage Gif

How it works

A <span> with real text is styled with color: transparent and font-size scaled down. A ::after pseudo-element renders the logo as a background-image, positioned absolutely so it can overflow freely. CSS custom properties control everything:

| Property | What it does | |----------|-------------| | --il-logo | The logo image (url(...)) | | --il-scale | Text slot width multiplier (1 = natural width) | | --il-pad | Horizontal padding around the text slot | | --il-logo-width | Logo visual width (%) | | --il-logo-height | Logo visual height as % of parent text height | | --il-offset-x / --il-offset-y | Nudge the logo visual |

Install

npm install inline-logo

Always import the CSS:

import 'inline-logo/style.css';

Usage

Pure HTML + CSS (zero JS)

<link rel="stylesheet" href="node_modules/inline-logo/dist/style.css">

<p>
  Works with any
  <span class="inline-logo" style="
    --il-logo: url('/logos/google.svg');
    --il-offset-y: 1px;
    --il-pad: 2px;
  ">Google</span>
  product.
</p>

data-inline-logo + init()

Define logos once, apply them declaratively:

<p>
  Push to <span data-inline-logo="github">GitHub</span> and
  publish on <span data-inline-logo="npm">npm</span>.
</p>

<script type="module">
  import { init } from 'inline-logo';

  init({
    github: { logo: '/logos/github.svg', scale: 0.35, offsetY: 1 },
    npm:    { logo: '/logos/npm.svg',    pad: 4, offsetY: 1 },
  });
</script>

Generate HTML strings

import { html, createLogoRenderer } from 'inline-logo';

// One-off
const span = html('Google', {
  logo: '/logos/google.png',
  offsetY: 1,
});

// Reusable logo renderer
const renderLogo = createLogoRenderer({
  google: { logo: '/logos/google.png', pad: 2, offsetY: 1 },
  github: { logo: '/logos/github.svg', scale: 0.35, offsetY: 1 },
});

element.innerHTML = `Deploy from ${renderLogo('github')} to ${renderLogo('google')} Cloud.`;

Dynamic content with observe()

For SPAs or content loaded after page init — uses a MutationObserver:

import { observe } from 'inline-logo';

const disconnect = observe({
  github: { logo: '/logos/github.svg', scale: 0.35, offsetY: 1 },
});

// Later: stop watching
disconnect();

API

getStyles(config): InlineLogoStyleProps

Convert config into CSS custom properties. Works with any framework.

html(text, config): string

Generate an HTML string for a single inline logo.

createLogoRenderer(logos): (name, text?) => string

Create a reusable function that generates HTML strings from a logo registry.

init(logos, root?): void

Scan the DOM for [data-inline-logo] elements and style them.

observe(logos, root?): () => void

Watch the DOM for dynamically added [data-inline-logo] elements. Returns a cleanup function.

Config

interface InlineLogoConfig {
  logo: string;        // URL or data URI — any image format (required)
  scale?: number;      // Text slot width multiplier (default: 1)
  pad?: number;        // Horizontal padding in px (default: 0)
  logoWidth?: number;  // Logo visual width % (default: 100)
  logoHeight?: number; // Logo visual height % of parent text (default: 100)
  offsetX?: number;    // Horizontal nudge in px (default: 0)
  offsetY?: number;    // Vertical nudge in px (default: 0)
}

Logo sources

This package does not ship logos. Bring your own, or use:

  • Simple Icons — 3000+ brand SVGs, CDN: https://cdn.simpleicons.org/{name}
  • Vector Logo Zone — consistent and clean SVG format logos, great for optical typography matching.
  • Brandfetch — logo API

License

MIT