<mq-piano-chord>
Piano keyboard with chord visualization. Pass a chord name, get highlighted keys.
Supports inversions via slash chords (C/E, C/G),
note-labels, and customizable active color.
npm install @hsablonniere/musiq
import '@hsablonniere/musiq/mq-piano-chord';
| Attribute | Property | Type | Default | Description |
|---|---|---|---|---|
chord |
chord |
string |
— | Chord name (e.g. "C", "Ebm", "F#maj7"). Supports slash chords for inversions ("C/E") |
note-labels |
noteLabels |
boolean |
false |
Show note names on active keys (English notation: A, B, C, D, E, F, G) |
| Property | Default | Description |
|---|---|---|
--mq-piano-chord-active-color |
#4a90d9 |
Fill color for active (chord) keys |
| Part | Description |
|---|---|
title |
Chord 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) |
Major, minor, diminished.
Major 7, minor 7, dominant 7.
Display note names on active keys with the note-labels attribute.
Chord over a specific bass note.
Root position
1st inversion
2nd inversion
Customize via --mq-piano-chord-active-color.