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

react-muscle-map

v0.1.2

Published

Themeable React muscle maps and packaged datasets for free-exercise-db.

Readme

React Muscle Map

Themeable inline SVG muscle maps for all 873 exercises in free-exercise-db.

The package also includes the complete image-free exercise dataset as aggregate and per-exercise JSON exports.

Installation

npm install react-muscle-map

React 18 or newer is required as a peer dependency.

Quick start

Import the component and stylesheet:

import { ExerciseMuscleMap } from 'react-muscle-map'
import 'react-muscle-map/styles.css'

export function MusclePreview() {
  return <ExerciseMuscleMap exerciseId="Barbell_Full_Squat" />
}

Exercise ID API

Use the dataset-aware component when an exercise ID is available. TypeScript accepts only known exercise IDs.

import { ExerciseMuscleMap } from 'react-muscle-map'
import 'react-muscle-map/styles.css'

<ExerciseMuscleMap exerciseId="Barbell_Full_Squat" />

Unknown IDs throw a clear runtime error for untyped JavaScript consumers.

Tree-shakable exercise components

All exercise-specific wrappers are available as subpath imports. These imports avoid including the complete 873-entry registry.

import BarbellFullSquatMuscleMap from 'react-muscle-map/exercises/Barbell_Full_Squat'

<BarbellFullSquatMuscleMap />

Custom muscle targets

import { MuscleMap } from 'react-muscle-map'
import 'react-muscle-map/styles.css'

export function ExerciseMuscles({ exercise }) {
  return (
    <MuscleMap
      primaryMuscles={exercise.primaryMuscles}
      secondaryMuscles={exercise.secondaryMuscles}
      title={`${exercise.name} muscle map`}
    />
  )
}

Theming

Override the CSS variables from any theme boundary:

.dark-theme .muscle-map {
  --muscle-primary-color: #a78bfa;
  --muscle-secondary-color: #6d5cae;
  --muscle-inactive-color: #4b5563;
  --muscle-body-color: #1f2937;
  --muscle-separator-color: #111827;
}

Available variables:

  • --muscle-primary-color
  • --muscle-secondary-color
  • --muscle-inactive-color
  • --muscle-body-color
  • --muscle-separator-color

Every muscle group has a readable instance-scoped ID, a stable data-muscle value, and a data-state of primary, secondary, or inactive. The SVG remains inline so application themes can style it without regenerating assets.

Public API

  • ExerciseMuscleMap
  • MuscleMap
  • exerciseTargets
  • getExerciseTargets
  • MUSCLE_GROUPS
  • getMuscleState
  • validateMuscleGroups
  • toMuscleId

The package includes ESM, CommonJS, source maps, CSS, and TypeScript declarations.

Datasets

Import the complete image-free dataset:

import exercises from 'react-muscle-map/datasets/exercises.json'

Import one exercise without loading the complete dataset:

import barbellFullSquat from 'react-muscle-map/datasets/exercises/Barbell_Full_Squat'

The integrity manifest is also exported:

import datasetManifest from 'react-muscle-map/datasets/manifest.json'

TypeScript projects importing JSON should enable resolveJsonModule. Runtime JSON import syntax depends on the target runtime; bundlers generally handle these exports directly.

Attribution

The exercise metadata distributed with this library is derived from free-exercise-db, an open public-domain exercise dataset maintained by yuhonas and its contributors.

free-exercise-db is released under the Unlicense. This library preserves that public-domain license and does not claim ownership of the upstream exercise names, instructions, classifications, or muscle metadata.

Please retain this attribution when redistributing the packaged datasets.

Development

Run the framework-independent validation with:

node generated/muscle-map/muscleMap.test.mjs

Regenerate the complete component and dataset set with:

npm run generate
npm run check:generated

Build and validate the publishable package with:

npm install
npm run prepack