0.4.6 • Published 10 months ago

react-ukelele v0.4.6

Weekly downloads
7
License
MIT
Repository
github
Last release
10 months ago

Ukelele React Module

Live example here

This is a very basic react module that generates the headstock and the strings of an Ukelele in svg. It can also build a chord using the chord parameter when it gets created.

Install

npm install react-ukelele

How to use

For render the component you just need to pass the chord prop. The list of chords available can be seen in here

render() {
  return(
    <Ukelele chord={'A'}/>
  )
}

Want more?

For adding more chords (or customized ones) you can do so by updating the chord list mentioned above. The structure is the following:

A chord contains a list of fingers, and each one of the fingers can take 1 or more strings. The strings go from 1(highest) to 4(lowest).

So the C chord would be like this:

C : [{
  string [1],
  fret: 2,
  fingerId: 1 // this can vary depending on the user
}]

A more complex chord like G (which it takes 3 fingers, each one in a different string):

G: [{
    string: [1],
    fret: 2,
    fingerId: 1
  },
  {
    string: [3],
    fret: 2,
    fingerId: 2
  },
  {
    string: [2],
    fret: 3,
    fingerId: 3
  }],

Credits

Jordi Llobet | @newpatriks

0.4.6

10 months ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.1

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago