npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pepavlin/sheet-api-react

v0.2.1

Published

React components for displaying and editing musical sheets with chords

Downloads

6

Readme

@pepavlin/sheet-api-react

React components for working with musical sheets and chords, built on top of @pepavlin/sheet-api.

Installation

npm install @pepavlin/sheet-api-react

Demo

Check out the live demo to see all features in action:

npm run demo:install
npm run demo

The demo showcases:

  • Multiple display styles (default, modern, smart, printCompact, experimental)
  • HTML and PDF preview side-by-side
  • Edit mode with live preview
  • Chord visibility toggle
  • Multi-column layouts

Usage

Sheet Display

import { SheetDisplay, Sheet } from "@pepavlin/sheet-api-react";

function SongSheet() {
    const sheetData = `
    [C]Amazing [F]grace
    How [G]sweet the [C]sound
  `;

    const sheet = new Sheet(sheetData);

    return (
        <SheetDisplay
            sheet={sheet}
            title='Amazing Grace'
            hideChords={false}
            variant='default'
            columns={1}
        />
    );
}

PDF Export

import { PdfSheetDisplay, Sheet } from "@pepavlin/sheet-api-react";
import { PDFViewer } from "@react-pdf/renderer";

function SongPDF() {
    const sheetData = `[C]Amazing [F]grace`;
    const sheet = new Sheet(sheetData);

    return (
        <PDFViewer width='100%' height='600px'>
            <PdfSheetDisplay
                sheet={sheet}
                title='Amazing Grace'
                variant='default'
                hideChords={false}
            />
        </PDFViewer>
    );
}

Editable Sheet

import { SheetDisplay, Sheet } from "@pepavlin/sheet-api-react";
import { useState } from "react";

function EditableSong() {
    const [sheetData, setSheetData] = useState("[C]Amazing [F]grace");
    const [title, setTitle] = useState("Amazing Grace");

    const sheet = new Sheet(sheetData);

    return (
        <SheetDisplay
            sheet={sheet}
            title={title}
            editMode={true}
            hideChords={false}
            onChange={(data, newTitle) => {
                setSheetData(data);
                setTitle(newTitle);
            }}
        />
    );
}

Components

SheetDisplay

Displays a complete song sheet with text and chords.

Props:

  • sheet: Sheet - Sheet instance from @pepavlin/sheet-api
  • title?: string - Song title
  • hideChords: boolean - Whether to hide chord symbols
  • variant?: SheetStyle - Display style ('default', 'default-preview', 'modern', 'smart', 'printCompact', 'experimental')
  • columns?: number - Number of columns for layout (default: 1)
  • editMode?: boolean - Enable edit mode
  • onChange?: (sheetData: string, title: string) => void - Callback for edit mode changes
  • titlePlaceholder?: string - Placeholder for title input in edit mode
  • contentPlaceholder?: string - Placeholder for content input in edit mode

PdfSheetDisplay

Renders sheet as a PDF document using @react-pdf/renderer.

Props:

  • sheet: Sheet - Sheet instance from @pepavlin/sheet-api
  • title?: string - Song title
  • variant?: SheetStyle - Display style
  • hideChords: boolean - Whether to hide chord symbols

EditSheet

Standalone editor component for editing sheet content.

Props:

  • sheet: Sheet - Sheet instance
  • title: string - Current title
  • onChange: (sheetData: string, title: string) => void - Change callback
  • titlePlaceholder?: string - Title input placeholder
  • contentPlaceholder?: string - Content input placeholder

License

ISC