react-music-score
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

react-music-score

A music score editor component for React using Vexflow and MusicXML

Cypress NPM JavaScript Style Guide

Install

npm install --save react-music-score

Usage

import React, { Component } from 'react';
 
import ScoreEditor from 'react-music-score';
import 'react-music-score/dist/index.css';
 
class Example extends Component {
  render() {
    return <ScoreEditor />;
  }
}

Using this with Next.js? Because of the Vexflow dependency not working in Node.js, you need to dynamically import this component, to prevent SSR

import dynamic from "next/dynamic";
 
const ScoreEditor = dynamic(() =>
  import("react-music-score")
    .then((mod) => mod.ScoreEditor)
    .catch((e) => {
      // will throw server side - ignore this
      return null;
    })
);
 
....

License

MIT © Caesura

Package Sidebar

Install

npm i react-music-score

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

935 kB

Total Files

25

Last publish

Collaborators

  • vnieman