Skip to content

coston/instant-table

Repository files navigation

⌗ instant-table

Input data, output a react responsive table ✨

npm package version  npm downloads  code style: prettier

Live Demo

https://instant-table.coston.io

Features

  • Instantly build a table from your array of objects
  • Automatic headers
  • Responsive conversion to HTML <dl> key-value format at mobile breakpoint
  • Great Accessibility
  • Customizations

Install

Install with npm:

npm i instant-table

Usage

const TableExample = () => (
    <Table
      data={mockData}
    />
)

Options

Prop Type Argument Default Description
data array required null array of objects
breakpoint string optional 768px Width at which the table becomes a list
headerOrder array optional first object order Choose columns to display with order
rowHeaders boolean optional false convert first column to row headers
caption string optional null add a table caption
sortable boolean optional true set to false to disable sortability
tableColor string optional black set header background color
headerTextColor string optional white set header text color

Contributing

Please help ship data faster! Submit any issues and/or make a pull request!