JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 519
  • Score
    100M100P100Q91247F
  • License MIT

UI for React-Table-7

Package Exports

  • react-table-ui

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-table-ui) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React-Table UI

NPM

Out-of-the-box UI for React-Table 7.

  • Customisable UI with custom theme and components.
  • Build with Typescript. Extends community types for React-Table.
  • Supports accessibility and keyboard interaction.
  • Allows all native React-Table configurations and extends on it.

The project is dedicated to the awesome work done at React-Table by Tanner Linsley as it wouldn't have been possible without his great library. I have personally use the library and wanted to contribute back to it somehow.

RTUI


Get started

Install

npm install react-table-ui
---
yarn add react-table-ui

Usage

import ReactTableUI from 'react-table-ui'
import { useMemo, useRef } from 'react'
import type { TableInstance } from 'react-table'

interface User {
  name: string
  age: number
}

const App = () => {
  // Provide data for the table
  const data: User[] = useMemo(
    () => [
      { name: 'Abc Xyx', age: 20 },
      { name: 'Def Uvw', age: 25 },
      { name: 'Ghi Rst', age: 23 },
      { name: 'Jklm Nopq', age: 30 }
    ],
    []
  )

  // Create an instance ref that will hold the reference to React Table instance.
  const tableInstanceRef = useRef<TableInstance<User>>()

  return (
    <ReactTableUI
      title='My Table'
      data={data}
      tableInstanceRef={tableInstanceRef}
    />
  )
}

API Documentation

All options and properties available for ReactTableUI component are listed here.

Examples

License

MIT © GuptaSiddhant