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

@musclemap/react

v1.1.0

Published

React component for MuscleMap — premium, data-driven muscle heatmaps (flat vector or photoreal hybrid).

Readme

@musclemap/react

npm version npm downloads

Premium, data-driven muscle heatmaps for React. Render the human body and color each muscle group by a 0–100 score — as a clean flat-vector figure or layered over a photorealistic body.

Part of MuscleMap — see the repo for the full documentation, asset workflow and screenshots.

Install

npm install @musclemap/react @musclemap/core @musclemap/assets react react-dom
# or
pnpm add @musclemap/react @musclemap/core @musclemap/assets react react-dom

@musclemap/core and @musclemap/assets are dependencies; react / react-dom are peers (^18 || ^19).

Quick start

Feed values keyed by MuscleGroup, each with a score from 0–100. That's the whole contract — your app owns aggregation, MuscleMap just renders.

import { MuscleMap } from "@musclemap/react";
import type { MuscleMapValues } from "@musclemap/core";

const values: MuscleMapValues = {
  CHEST:     { score: 88, volumeKg: 7200, sets: 24, trend: "UP" },
  TRAPEZIUS: { score: 90 },
  LATS:      { score: 84 },
  QUADS:     { score: 66 },
  CALVES:    { score: 26, trend: "DOWN" },
};

export function Analytics() {
  return (
    <MuscleMap
      values={values}
      view="BOTH"          // FRONT | BACK | BOTH
      colorModel="LOAD"    // LOAD | FREQUENCY | BALANCE | RECOVERY_RISK
    />
  );
}

Per-surface (left/right) addressing

Color a whole group via values, or override an individual surface via partValues (keyed by the path's id, e.g. HAMSTRINGS_LEFT). The selection callback reports the surface too — partId is undefined for a bundled path.

<MuscleMap
  values={{ HAMSTRINGS: { score: 70 } }}
  partValues={{
    HAMSTRINGS_LEFT:  { score: 90 },
    HAMSTRINGS_RIGHT: { score: 50 },
  }}
  onSelectMuscle={({ group, partId, value }) => {
    console.log(group, partId, value?.score); // "HAMSTRINGS" "HAMSTRINGS_LEFT" 90
  }}
/>

Photoreal hybrid

Pass a body photo as the background; it's clipped to the silhouette and (optionally) desaturated, with the colored muscles on top — pixel-aligned because both come from the same trace. Four ready-to-use photos ship with @musclemap/assets, or pass any URL of your own.

import maleFront from "@musclemap/assets/bodies/male-front.webp";
import maleBack  from "@musclemap/assets/bodies/male-back.webp";

<MuscleMap
  values={values}
  backgroundImageFront={maleFront}
  backgroundImageBack={maleBack}
  backgroundGrayscale
  backgroundBrightness={1.2}
  backgroundOpacity={0.45}
/>

Region views

Set region and cropToRegion for a real cropped view (not just a zoom):

<MuscleMap values={values} view="FRONT" region="UPPER_BODY" cropToRegion />
<MuscleMap values={values} view="FRONT" region="LOWER_BODY" cropToRegion />

Exports

MuscleMap, MuscleMapLegend, BodyFigure, humanizeMuscleGroup, DEFAULT_LEGEND_LABELS, DEFAULT_TOOLTIP_FIELDS, and the MuscleMapProps / BodyFigureProps / PartValues / TooltipField types.

MuscleMapLegend is the standalone legend used by MuscleMap. BodyFigure is a low-level renderer for advanced custom compositions; most consumers should use MuscleMap.

Full prop table and docs: https://github.com/Jsplice/MuscleMap

License

MIT