jsDelivr vexflow demo
HTML
<h1>VexFlow Single Note Dispay</h1>
<div id="output"></div>
<script src="https://cdn.jsdelivr.net/npm/vexflow@5.0.0/build/cjs/vexflow.js"></script>
CSS
body {
font-family: sans-serif;
margin: 30px;
}
#output {
border: 1px solid blue;
}
JavaScript
const { Factory, EasyScore, System } = VexFlow
const factory = new Factory({
renderer: {
elementId: "output",
width: 200,
height: 150,
},
})
const score = factory.EasyScore()
const system = factory.System()
system
.addStave({
voices: [
score.voice(score.notes("G3/w")),
],
})
.addClef("treble");
factory.draw()