0.0.5 • Published 3 years ago

@grahack/react-sheet-music-mirror v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

React Sheet Music

React component to render interactive sheet music using ABC notation. Powered by ABC JS under the hood.

Work in progress

Install

$ npm install @slnsw/react-sheet-music

Usage

import SheetMusic from 'react-sheet-music';

const MyComponent = () => {
  return (
    <SheetMusic
      // Textual representation of music in ABC notation
      // The string below will show four crotchets in one bar
      notation="|EGBF|"
    />
  );
};

Props

PropTypeDescription
notationstringTextual representation of music in ABC notation
isPlayingbooleanIf playing, the notes will highlight and onBeat, onEvent and onLineEnd callbacks will run
responsivestringUndefined or 'resize'
classNamestringCustom class name to add to sheet music div
onClickfunctionCallback for when any part of the sheet music is clicked on
onBeatfunction
onEventfunction
onLineEndfunction

Development

# Install packages for this component
$ npm install
# This builds the component in watch mode
$ npm start

# Open up a new terminal window and go to repo location
$ cd example
# Install packages for example app
$ npm install
# Test out component in app
$ npm start