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

globe-background

v1.0.0

Published

Interactive globe animation that can be used as a background in web projects

Readme

Globe Background

An interactive globe animation that can be used as a background in web projects. This project provides a web component that renders an animated globe using braille characters.

Originally created on CodePen: https://codepen.io/410gone/pen/jvMJMd

Usage via CDN

You can use this component directly in your HTML via CDN:

<!-- UMD version (works in all browsers) -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/globe-background.umd.js"></script>

<!-- Or ESM version (for modern browsers and bundlers) -->
<script type="module">
  import GlobeBackground from "https://cdn.jsdelivr.net/npm/[email protected]/dist/globe-background.esm.js";
</script>

Then use the custom element in your HTML:

<globe-background
  background="#2e3440"
  foreground="#eceff4"
  size="100vmin"
  font-size="11px"
>
</globe-background>

Usage in a TypeScript + Tailwind + Vite Project

Option 1: Using npm

  1. Install the package:
npm install globe-background
  1. Import in your TypeScript file:
import "globe-background";

// Types (create a file like globe-background.d.ts in your project)
declare global {
  namespace JSX {
    interface IntrinsicElements {
      "globe-background": GlobeBackgroundAttributes;
    }
  }

  interface GlobeBackgroundAttributes
    extends React.HTMLAttributes<HTMLElement> {
    background?: string;
    foreground?: string;
    size?: string;
    "font-size"?: string;
  }
}
  1. Use in your component:
const MyComponent = () => {
  return (
    <div className="relative h-screen w-full">
      <globe-background
        background="#2e3440"
        foreground="#eceff4"
        size="100vmin"
        font-size="11px"
      ></globe-background>

      {/* Your content on top of the globe */}
      <div className="absolute inset-0 flex items-center justify-center">
        <h1 className="text-white text-4xl font-bold">
          Content on top of the globe
        </h1>
      </div>
    </div>
  );
};

Option 2: Using CDN

  1. Create a component that loads the globe from CDN:
// components/GlobeBackground.tsx
import { useEffect } from "react";

type GlobeBackgroundProps = {
  background?: string;
  foreground?: string;
  size?: string;
  fontSize?: string;
  className?: string;
};

export default function GlobeBackground({
  background = "#2e3440",
  foreground = "#eceff4",
  size = "100vmin",
  fontSize = "11px",
  className = "",
}: GlobeBackgroundProps) {
  useEffect(() => {
    // Load the script
    const script = document.createElement("script");
    script.src =
      "https://cdn.jsdelivr.net/npm/[email protected]/dist/globe-background.umd.js";
    script.async = true;
    document.body.appendChild(script);

    return () => {
      document.body.removeChild(script);
    };
  }, []);

  return (
    <globe-background
      className={className}
      background={background}
      foreground={foreground}
      size={size}
      font-size={fontSize}
    ></globe-background>
  );
}
  1. Use in your project:
import GlobeBackground from "./components/GlobeBackground";

export default function HomePage() {
  return (
    <div className="relative h-screen w-full">
      <GlobeBackground />

      <div className="absolute inset-0 flex items-center justify-center">
        <h1 className="text-white text-4xl font-bold">My Content</h1>
      </div>
    </div>
  );
}

Attributes

| Attribute | Description | Default | | ---------- | ----------------------------- | ------- | | background | Background color | #2e3440 | | foreground | Globe color | #eceff4 | | size | Size of the globe | 100vmin | | font-size | Font size for braille display | 11px |

License

MIT