A React component that renders ukulele chord diagrams.
It expects you to have the chord name and its numerical representation. See below.
Run the following command:
npm install -s ukulele-chord
import React from 'react';import ReactDOM from 'react-dom';import UkuleleChord from './lib/UkuleleChord';ReactDOM;
There are only two required arguments:
name: the name of the chord per ser. C, F major, Emin(maj7) you name it.
frets: is the numeric representation of the chord as an
arrayof 4 numbers. Use
0to represent no pressed string.
<UkuleleChord ="C" =/>
There is no need to calculate the initial chord's fret. Just set the real fret position and let the component do the rest:
<UkuleleChord ="Db7+" =/>
<UkuleleChord ="B7" =/>