@candidstartup/react-spreadsheet
TypeScript icon, indicating that this package has built-in type declarations

0.12.0 • Public • Published

React TypeScript NPM Version NPM bundle size Build Status

GitHub | NPM | Storybook | API

@candidstartup/react-spreadsheet

React based spreadsheet frontend. Written in TypeScript using modern React. Scalable to trillions of rows and columns.

Interface

The package provides a combined VirtualSpreadsheet component that includes a spreadsheet grid, row and column headers and input bar. The component is virtualized with data retrieved on demand via a SpreadsheetData interface. The component supports data sources that change independently.

The package includes VirtualSpreadsheet.css which provides basic styling using the BEM convention. The stylesheet can be imported directly or as a CSS module for isolation. Use your own CSS if you prefer.

A theming system allows you to map the component's local BEM style class names to whatever class names the consuming app would like to use. This allows you to use VirtualSpreadsheet with other CSS conventions, Atomic CSS, or CSS in JS.

VirtualSpreadsheet can be combined with AutoSizer from react-virtual-scroll to fill the available space.

Implementation

VirtualSpreadsheet is built using components from the react-virtual-scroll package. It uses numfmt for ECMA-376 compatible number formatting.

VirtualSpreadsheet Example

import { VirtualSpreadsheet, VirtualSpreadsheetDefaultTheme as theme } from '@candidstartup/react-spreadsheet';
import '@candidstartup/react-spreadsheet/VirtualSpreadsheet.css';
import { BoringData } from './BoringData';

const data = new BoringData;

...

<VirtualSpreadsheet
  data={data}
  theme={theme}
  height={380}
  width={700}>
</VirtualSpreadsheet>

Check out the full sample or try it out on Storybook

More

Want to know more? Check out my blog

Package Sidebar

Install

npm i @candidstartup/react-spreadsheet

Weekly Downloads

22

Version

0.12.0

License

BSD-3-Clause

Unpacked Size

109 kB

Total Files

8

Last publish

Collaborators

  • timwiegand