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

@forcir/logo-element

v0.1.1

Published

Forcir logo as vanilla JS custom elements (forcir-logo, forcir-brandmark, forcir-wordmark)

Readme

@forcir/logo-element

Forcir logo as vanilla JavaScript custom elements. No frameworks, no build step—types are hand-written .d.ts files and the package types field points at them.

Elements

  • <forcir-logo /> — Full lockup (brandmark + wordmark)
  • <forcir-brandmark /> — Icon only
  • <forcir-wordmark /> — Wordmark only

All use Shadow DOM (open) and support the same attributes and CSS variables.

This package is intended for browser environments (including bundlers that target the browser). The elements use HTMLElement and Shadow DOM.

Installation

npm install @forcir/logo-element
# or
pnpm add @forcir/logo-element

Usage

Script tag

<script type="module" src="node_modules/@forcir/logo-element/src/index.js"></script>
<forcir-logo />
<forcir-brandmark height="24" />
<forcir-wordmark />

ES module

import "@forcir/logo-element";
// Elements are now registered: <forcir-logo>, <forcir-brandmark>, <forcir-wordmark>

Or use the classes programmatically:

import { ForcirLogoElement, ForcirBrandmarkElement, ForcirWordmarkElement } from "@forcir/logo-element";
// Use with customElements.define or document.createElement after registration

Using in React

Import the package once (e.g. in your root component or layout) so the custom elements are registered; then use the tags in any component. Your bundler will resolve the ESM package as usual.

// In your app entry or layout (once)
import "@forcir/logo-element";

function Header() {
  return (
    <header>
      <a href="/">
        <forcir-logo height={24} />
      </a>
    </header>
  );
}
  • Attributes: Pass height as a number; React will set the attribute on the DOM node. Use className and style as usual (e.g. style={{ ["--forcir-logo-foreground"]: "oklch(0.2 0 0)" }}).

  • TypeScript: To type the custom elements in JSX, reference the included declaration so <forcir-logo /> is valid. In your tsconfig.json add to "include" (or add a /// <reference /> in a .d.ts file):

    "include": ["src", "node_modules/@forcir/logo-element/src/react.d.ts"]

    Your project must have @types/react installed. Then you get typed props (e.g. height?: number) and refs for the custom elements.

Attributes

| Attribute | Type | Default | Description | |----------|--------|---------|--------------------------| | height | number | 18 | SVG height in pixels |

Example: <forcir-brandmark height="24" />

CSS variables (pass-through)

Set these on the custom element or any ancestor so they inherit into the shadow root:

| Variable | Description | Used by | |----------------------------|--------------------------------|----------------| | --forcir-logo-foreground | Main logo colour | All variants | | --forcir-logo-muted | Secondary colour (brandmark) | Brandmark only |

Example:

forcir-logo {
  --forcir-logo-foreground: oklch(0.2 0 0);
  --forcir-logo-muted: oklch(0.5 0 0);
}

OKLCH and fallback

The component uses OKLCH for default colours when the browser supports it, with an rgba fallback when OKLCH is not supported. Internal defaults use the --forcir-internal-* namespace; you only need to set the public --forcir-logo-* variables to customize. No JavaScript colour conversion—everything is handled in CSS via @supports.

License

UNLICENSED