<mq-piano-scale>

Piano keyboard with scale visualization. Major, minor, pentatonic, blues, modes (dorian, phrygian, lydian…), and more. Distinct root color, note-labels, and degree-labels.

← Back to index

Install

npm install @hsablonniere/musiq
import '@hsablonniere/musiq/mq-piano-scale';

API

Attributes / Properties

Attribute Property Type Default Description
scale scale string Scale name (e.g. "C major", "A minor pentatonic", "D dorian"). See tonal scale-type for the full list of supported scales
note-labels noteLabels boolean false Show note names on active keys
degree-labels degreeLabels boolean false Show scale degree numbers (1–7) on active keys

CSS Custom Properties

Property Default Description
--mq-piano-scale-active-color #27ae60 Fill color for scale note keys
--mq-piano-scale-root-color #1e8449 Fill color for root note keys

CSS Parts

Part Description
title Scale name heading above the keyboard
key All keys (forwarded from mq-piano)
key-white White keys (forwarded from mq-piano)
key-black Black keys (forwarded from mq-piano)

Basic — major & minor scales

Note labels

Display note names on active keys with the note-labels attribute.

Degree labels

Show scale degree numbers with the degree-labels attribute.

Modes

Church modes from C

Dorian

Phrygian

Lydian

Exotic scales

Pentatonic, blues, whole tone.

Major pentatonic

Blues

Whole tone

Style — active color

Customize via --mq-piano-scale-active-color and --mq-piano-scale-root-color.