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

pixel-avatar-motion

v0.1.1

Published

100 animated pixel-art avatars with eight states, built on @ga1az/react-pixel-motion.

Readme

pixel-avatar-motion

100 hand-built pixel-art avatars, each with eight animation states, rendered through @ga1az/react-pixel-motion.

  • 100 avatars with stable ids (px-001 … px-100), names, palettes and traits.
  • 8 states: idle, walking, working, talking, thinking, asking, healing, sleeping.
  • Zero asset setup: every 240×320 sprite sheet is embedded as a PNG data URL.
  • TypeScript, ESM and CommonJS builds, React 18 and 19.

Install

pnpm add pixel-avatar-motion
# or: npm install pixel-avatar-motion

react and react-dom are peer dependencies and are not bundled.

Usage

import { PixelAvatar } from "pixel-avatar-motion";

export function Assistant() {
  return <PixelAvatar id="px-042" state="thinking" scale={5} />;
}

Switch states as your app changes:

import { PixelAvatar, type AvatarState } from "pixel-avatar-motion";

function StatusAvatar({ state }: { state: AvatarState }) {
  return (
    <PixelAvatar
      id="px-007"
      state={state}
      scale={4}
      onFrameChange={(frame) => console.log("frame", frame)}
    />
  );
}

Browse every avatar and state in the bundled showcase app under apps/web.

API

<PixelAvatar /> accepts:

| Prop | Type | Default | Description | | --- | --- | --- | --- | | id | AvatarId | required | Avatar id from px-001 to px-100. | | state | AvatarState | "idle" | Animation row to play. | | scale | number | 4 | Integer scale; the rendered size is 40 * scale square. | | fps | number | per state | Overrides the state's default frame rate. | | playing | boolean | true | Pause or resume the animation. | | loop | boolean | true | Loop the six-frame cycle. | | pixelated | boolean | true | Keep hard pixel edges when scaled. | | className, style, title | — | — | Standard wrapper attributes. | | onFrameChange | (frame: number) => void | — | Called on every frame change. | | onAnimationEnd | () => void | — | Called when a non-looping cycle ends. |

The rendered wrapper is a <span role="img"> with an accessible label such as "Ada Adeyemi — thinking" and data-avatar-id / data-avatar-state attributes.

Registry helpers

import {
  AVATARS,
  AVATAR_COUNT,
  AVATAR_IDS,
  AVATAR_STATES,
  AVATAR_STATE_INFO,
  SPRITES,
  SPRITE_MANIFEST,
  getAvatar,
  getAvatarSprite,
  isAvatarId,
} from "pixel-avatar-motion";

| Export | Description | | --- | --- | | AVATARS | Full definitions: id, name, traits and palette. | | AVATAR_COUNT | 100. | | AVATAR_IDS | Tuple and AvatarId union of all ids. | | AVATAR_STATES | State names in sprite-row order. | | AVATAR_STATE_INFO | Human labels, descriptions and default frame rates. | | SPRITES | Record<AvatarId, string> of PNG data URLs. | | SPRITE_MANIFEST | Frame size, column count and row count. | | getAvatar(id) | Definition or undefined. | | getAvatarSprite(id) | Data URL or undefined. | | isAvatarId(value) | Type guard for arbitrary strings. |

States

| State | Default fps | Frames | What happens | | --- | --- | --- | --- | | idle | 5 | 6 | Breathing and an occasional blink. | | walking | 10 | 6 | In-place walk cycle with swinging arms and dust. | | working | 6 | 6 | Typing at a desk with a spinning gear. | | talking | 8 | 6 | Mouth movement, a gesturing hand and speech dots. | | thinking | 5 | 6 | Hand on the chin with drifting thought bubbles. | | asking | 6 | 6 | Raised hand and a bouncing question mark. | | healing | 8 | 6 | Happy closed eyes and rising sparkles. | | sleeping | 3 | 6 | Tilted head, closed eyes and floating Zs. |

Bundle size

The package ships one 240×320 PNG per avatar. All 100 sheets total roughly 576 KB of PNG data (about 768 KB once base64-encoded, inside the 811 KB JS bundle, before gzip). Importing the package includes every sheet because they share one registry. If you need a smaller payload, import a subset at build time or copy the individual data URLs you use.

Development

From the repository root:

pnpm install
pnpm generate   # rebuild src/generated from scripts/art
pnpm test
pnpm typecheck
pnpm build
pnpm dev        # showcase app

The art is generated procedurally from scripts/art/; no external image assets are required. Edit the drawing code, run pnpm generate, and the sprite sheets, avatar metadata and TypeScript declarations are regenerated together.

License

MIT