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

rune-ascii

v0.2.0

Published

Composable ASCII art animations for React

Downloads

342

Readme

rune-ascii

npm downloads

Composable ASCII art animations for React. Drop in ASCII art animations the same way you'd use an icon pack.

Rune takes video files and converts them into grids of ASCII characters (frame by frame) so they can play as text-based animations in the browser. Each pixel's brightness is mapped to a character (dark pixels become dense characters like @, bright pixels become light ones like .) and each character can retain its original color. The result is a looping, purely text-rendered ASCII animation that you can adjust to any level of granularity.

Installation

npm install rune-ascii

Requires React 18 or later as a peer dependency.

Quick start

import { Rune } from "rune-ascii";

<Rune name="ghost" />;

That's it. The component fetches the animation data from a CDN and plays it automatically.

Usage

import { Rune } from "rune-ascii";

// Built-in animation from CDN
<Rune name="ghost" />

// Smaller size variant (45 columns instead of 90)
<Rune name="ghost" size="s" />

// Control playback
<Rune name="fire" playing={false} />
<Rune name="fire" fps={15} loop={false} />

// Apply a color tint
<Rune name="fire" colorOverlay="linear-gradient(90deg, rgba(247,70,5,0.6), rgba(255,140,0,1))" />

// Load from a custom URL
<Rune src="/my-animations/custom.rune.json" />

// Pass animation data directly
<Rune data={myAnimationData} />

Props

| Prop | Type | Default | Description | | -------------- | ------------------------- | --------- | ---------------------------------------- | | name | string | — | Animation name, fetches from CDN | | size | "s" \| "m" | "m" | Size variant (45 or 90 columns) | | data | RuneAnimation | — | Pass animation data directly | | src | string | — | URL to fetch animation data from | | playing | boolean | true | Play/pause control | | loop | boolean | true | Loop the animation | | fps | number | from data | Override playback speed | | colorOverlay | string | — | CSS gradient to tint the animation | | className | string | — | Class on the container element | | style | CSSProperties | — | Inline styles on the container | | onFrame | (index: number) => void | — | Called on each frame change | | onComplete | () => void | — | Called when a non-looping animation ends |

Custom CDN / self-hosting

By default, animations are fetched from jsDelivr. You can point to your own host:

import { setRuneCdn } from "rune-ascii";

setRuneCdn("https://my-cdn.com/animations");
// Now <Rune name="ghost" /> fetches from https://my-cdn.com/animations/ghost.rune.json

Or use the src prop per-component to fetch from any URL.

Performance

The component is performance conscious out of the box:

  • Lazy loading: only fetches animation data when the element is near the viewport (IntersectionObserver)
  • Auto pause: stops playing when scrolled out of view or when the browser tab loses focus
  • Reduced motion: respects prefers-reduced-motion
  • Incremental updates: reuses DOM nodes and only updates characters that changed between frames
  • Zero dependencies: no Tailwind, no CSS files, just inline styles

Built-in animations

These are available via CDN out of the box when using the name prop:

| Animation | Description | | --------------- | -------------------- | | fire | Flickering fire | | flame | Single flame | | ghost | Floating ghost | | earth1 | Spinning globe | | earth2 | Spinning globe (alt) | | saturn | Saturn with rings | | coin | Spinning coin | | orangutan | Orangutan | | gorilla | Gorilla | | shoes | Shoes | | tuxLaptop | Tux on a laptop | | rocket | Rocket launch | | flowerSpinner | Spinning flower | | loaderGood | Loading spinner | | successCheck1 | Success checkmark | | error | Error indicator | | warning | Warning indicator | | sleepEmoji | Sleep emoji | | angryEmoji | Angry emoji | | geekedEmoji | Geeked emoji | | aitBot | AI robot |

Each animation is available in two sizes: "m" (90 columns, default) and "s" (50 columns).

Creating custom animations

Use the companion CLI to generate your own animations from any video file:

npx @rune-ascii/cli generate ./video.mp4 --name "my-animation"

See @rune-ascii/cli for full documentation.

Related packages

License

MIT