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

scale-slayer

v2.0.0

Published

Interactive guitar fretboard for learning scales, CAGED positions and the notes on the neck. Works on phones.

Readme

Scale Slayer

An interactive guitar neck for learning scales. Pick a key and a scale, and it shows every note across 22 frets, split into the five positions guitarists learn. You can hear the positions played, switch the labels to scale degrees, and drill yourself with a quick quiz.

It works on phones. In a narrow space the neck turns vertical, like a chord chart, so the notes stay big enough to read and tap.

Try it at scale-slayer.vercel.app.

Install

npm install scale-slayer

React 18 or newer is a peer dependency.

Use

import { ScaleSlayer } from 'scale-slayer';
import 'scale-slayer/style.css';

export function Practice() {
  return <ScaleSlayer headingLevel={2} />;
}

Import the stylesheet once. Every class is scoped under .ss-root, so it won't touch the rest of your page.

Props

| Prop | Type | Default | What it does | |---|---|---|---| | headingLevel | 1 to 6 | 1 | Level of the "Scale Slayer" heading, so it fits your page outline. | | showTitle | boolean | true | Hide the heading when your page already names the section. | | standalone | boolean | false | Keeps the settings in the page URL so a view can be shared. Leave off when embedding. | | orientation | 'auto' \| 'horizontal' \| 'vertical' | 'auto' | auto turns the neck vertical when the component is narrower than 820px. It measures its own width, not the screen's. | | defaultRoot | Note | Note.CSharp | Key shown at start. | | defaultScale | Scale | Scale.PentatonicMinor | Scale shown at start. | | defaultPositions | number[] | [2, 4] | Positions shown at start, numbered 1 to 5. | | className | string | | Extra class on the root element. |

Each <ScaleSlayer> keeps its own state, so you can put more than one on a page.

Scales

Minor pentatonic, major pentatonic, blues, major, natural minor, harmonic minor, melodic minor, Dorian, Phrygian, Lydian, Mixolydian and Locrian, in all twelve keys.

Pentatonic and blues scales use the five standard pentatonic boxes. The seven-note scales use the five CAGED shapes of their parent major scale. Position 1 is always the shape that starts on the root on the low E string.

Practice features

  • Degrees. Switch note names to scale degrees (1, b3, 4 and so on). The root is ringed.
  • Hear it. Tap any note to hear it. Play positions runs the selected positions up and down in time, lighting each note as it sounds.
  • Metronome with an accented first beat, from 30 to 300 BPM.
  • Quiz. "Find the note" asks for a named note anywhere on the neck. "Find the degree" asks for a degree of the current scale in the positions you have selected. Ten questions per round, scored on first-time answers.

Theming

Override the custom properties on .ss-root, for example:

.ss-root {
  --ss-bg: #101010;
  --ss-accent: #00c7be;
  --ss-accent-ink: #00201f;
}

The full list is at the top of scale-slayer/style.css. The defaults meet WCAG AA contrast.

The music engine

The scale maths is exported too, if you want it without the component:

import { Note, Scale, scaleNotes, scalePositions, degreeOf } from 'scale-slayer';

scaleNotes(Note.A, Scale.Dorian);           // A B C D E F# G
degreeOf(Note.C, Note.A, Scale.Minor);      // 'b3'
scalePositions(Note.G, Scale.Major)[0];     // notes in the first CAGED shape

Upgrading from 1.x

  • Import scale-slayer/style.css. Version 1 used inline styles.
  • The component no longer renders a <main> element. Pass headingLevel to set the heading level.
  • GuitarFretboard still works as an alias for ScaleSlayer.
  • Tone.js is gone, so the package is about 38 kB instead of 438 kB.

Develop

npm install
npm run dev        # standalone site at http://localhost:5173
npm test           # unit and component tests
npm run build:lib  # package build into dist/
npm run build      # standalone site build into dist-site/

License

MIT