air-grid
TypeScript icon, indicating that this package has built-in type declarations

1.2.6 • Public • Published

Air-Grid

View demo and documentation

A beautiful Airtable-like React component to visualize and edit your data.

Feature rich:

  • Dead simple to set up and to use
  • Supports copy / pasting to and from Excel, Google-sheet...
  • Keyboard navigation and shortcuts fully-supported
  • Supports right-clicking and custom context menu
  • Supports dragging corner to expand selection
  • Easy to extend and implement custom widgets
  • Blazing fast, optimized for speed, minimal renders count
  • Smooth animations
  • Virtualized rows and columns, supports hundreds of thousands of rows
  • Extensively customizable, controllable behaviors
  • Built with Typescript

Install

npm i air-grid

Usage

import {
  DataSheetGrid,
  checkboxColumn,
  textColumn,
  keyColumn,
} from 'air-grid'

// Import the style only once in your app!
import 'air-grid/dist/style.css'

const Example = () => {
  const [ data, setData ] = useState([
    { active: true, firstName: 'Elon', lastName: 'Musk' },
    { active: false, firstName: 'Jeff', lastName: 'Bezos' },
  ])

  const columns = [
    {
      ...keyColumn('active', checkboxColumn),
      title: 'Active',
    },
    {
      ...keyColumn('firstName', textColumn),
      title: 'First name',
    },
    {
      ...keyColumn('lastName', textColumn),
      title: 'Last name',
    },
  ]

  return (
    <AirGrid
      value={data}
      onChange={setData}
      columns={columns}
    />
  )
}

Package Sidebar

Install

npm i air-grid

Homepage

airgrid.dev

Weekly Downloads

592

Version

1.2.6

License

none

Unpacked Size

377 kB

Total Files

156

Last publish

Collaborators

  • jarostaz