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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sprd

v1.0.3

Published

An excel like spread sheet from the future

Downloads

15

Readme

Getting Started

npm install sprd

How it looks

Alt text

or

Demo Video

Available features

  1. Keyboard navigation using arrow keys or page up and page down
  2. Copy and Paste
  3. Infinite scrolling vertically and horizontally
  4. Custom cell formatting
  5. Drag highlighting

Loading inital data

import {SprdContainer} from 'sprd';

let data = [
  ['Name', 'Age'], 
  ['sam', 20], 
  ['Mike', 30], 
  ['Greg', 40], 
  ['Monroe', 50],
  ['sam', 20], 
  ['Mike', 30], 
  ['Greg', 40], 
  ['Monroe', 50],
  ['sam', 20], 
  ['Mike', 30], 
];

<SprdContainer 
  width={800}
  height={600}
  data={data}/>

Listening to events

import {SprdContainer} from 'sprd';

<SprdContainer 
  width={800}
  height={600}
  onEvent={(eventType, range, data) => {
     console.log(eventType, range, data) 
     if(range) console.log(range.getAddress())
  }}
  data={data}/>

Overriding the cells with custom ones


import {SprdContainer} from 'sprd';

<SprdContainer 
  width={800}
  height={600}
  cellOverride={(cellInfo, innerCell, outerCell) => {
    if(cellInfo.row === 0){
      innerCell = (
        <select {...innerCell.props} style={{padding: 3}} ref={innerCell.ref}>
          <option>Hello</option>
          <option>World</option>
        </select>
      )
    }
    if(cellInfo.row === 0){
      outerCell = <span {...outerCell.props} style={{fontWeight: 'bold'}}/>
    }

    if(cellInfo.row > 5 && cellInfo.row < 10){
      outerCell = <span {...outerCell.props} style={{color: 'green'}}/>
    }

    if(cellInfo.dataType === "number"){
      outerCell = <span {...outerCell.props} style={{color: 'blue', fontSize: 11}} key={outerCell.key}/>
    }
    return {innerCell, outerCell}}
  }
  data={data}/>

Getting all data currently in the spreadsheet

import {Store} from 'sprd';

console.log(Store.getData());

This will return a json object with the top level keys corresponding to the row indices and the keys in the nested json objects corresponding to column indices e.g

{
  0:{0: "Name", 1: "Age"},
  1:{0: "sam", 1: 20},
  2:{0: "Mike", 1: 30},
  3:{0: "Greg", 1: 40}
}

NB: Any cells without data are not captured

Props and meaning

  1. showHeaderLetters - whether to show the excel like header letters at the top of columns, default is true
  2. showFooter - whether to show the footer that displays the cell address, default is true
  3. infiniteScroll - whether to scroll infinitely both vertically and horizontally, default is true
  4. width - the width in pixels of the grid, default is 1000
  5. height - the height in pixels of the grid, default is 800
  6. onEvent - javascript function to listen to events in the spreadsheet
  7. columnDataTypes - an array containing the list of column data types
  8. cellOverride - a callback to override default cells with your own custom cells
  9. data - an array of arrays containing the default data