GithubHelp home page GithubHelp logo

linecode / react-spreadsheet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iddan/react-spreadsheet

0.0 1.0 0.0 11.14 MB

Simple, customizable yet performant spreadsheet for React

Home Page: https://iddan.github.io/react-spreadsheet

License: MIT License

JavaScript 6.30% CSS 3.68% TypeScript 90.03%

react-spreadsheet's Introduction

React Spreadsheet

Simple, customizable yet performant spreadsheet for React.

Screenshot FOSSA Status CI Coverage Status

npm install react-spreadsheet

or

yarn add react-spreadsheet

Features

  • Simple straightforward API focusing on common use cases while keeping flexibility
  • Performant (yet not virtualized)
  • Implements Just Components™

Usage

Getting Started

import React from "react";
import Spreadsheet from "react-spreadsheet";

const data = [
  [{ value: "Vanilla" }, { value: "Chocolate" }],
  [{ value: "Strawberry" }, { value: "Cookies" }],
];

const MyComponent = () => <Spreadsheet data={data} />;

Custom Components

import React from "react";
import Spreadsheet from "react-spreadsheet";

const RangeView = ({ cell }) => (
  <input
    type="range"
    value={cell.value}
    disabled
    style={{ pointerEvents: "none" }}
  />
);

const RangeEdit = ({ cell, onChange }) => (
  <input
    type="range"
    onChange={(e) => {
      onChange({ ...cell, value: e.target.value });
    }}
    value={cell.value || 0}
    autoFocus
  />
);

const data = [
  [{ value: "Flavors" }],
  [({ value: "Vanilla" }, { value: "Chocolate" })],
  [{ value: "Strawberry" }, { value: "Cookies" }],
  [
    { value: "How much do you like ice cream?" },
    { value: 100, DataViewer: RangeView, DataEditor: RangeEdit },
  ],
];

const MyComponent = () => <Spreadsheet data={data} />;

Prior Art

  • React Datasheet - Heavily inspired by, enhanced performance and API, no formulas
  • React Spreadsheet Grid - Virtualized, lacks significant UI parts, no formulas
  • Handsonetable - Virtualized, lacks dynamic customization. React Spreadsheet uses it's formulas parsing module

License

FOSSA Status

react-spreadsheet's People

Contributors

ben-pr-p avatar calebmpeterson avatar cpv123 avatar dependabot[bot] avatar edi avatar fossabot avatar iddan avatar katharosada avatar meetmangukiya avatar morloy avatar nullnull avatar nvonbulow avatar pcoffline avatar sophiabits avatar udielenberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.