{"library":"react-pivottable","title":"react-pivottable","description":"A React-based pivot table library with drag-and-drop UI for data exploration and analysis. Current stable version is 0.11.1, released October 2024. It summarizes data into table or Plotly.js charts with an Excel-like interface. Key differentiators: full drag-and-drop reordering, Plotly chart integration via dependency injection, and maintained by Plotly. Peer dependencies include React (>=15) and react-dom. It is a React port of the jQuery-based PivotTable.js and supports table and chart renderers. The library is class-component-based and uses CSS for styling.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install react-pivottable"],"cli":null},"imports":["import PivotTableUI from 'react-pivottable/PivotTableUI';","import TableRenderers from 'react-pivottable/TableRenderers';","import createPlotlyRenderers from 'react-pivottable/PlotlyRenderers';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PivotTableUI from 'react-pivottable/PivotTableUI';\nimport 'react-pivottable/pivottable.css';\n\nconst data = [\n  ['attribute', 'attribute2'],\n  ['value1', 'value2']\n];\n\nclass App extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = { data };\n  }\n\n  render() {\n    return (\n      <PivotTableUI\n        data={this.state.data}\n        onChange={s => this.setState(s)}\n        {...this.state}\n      />\n    );\n  }\n}\n\nReactDOM.render(<App />, document.getElementById('root'));","lang":"javascript","description":"Minimal setup: import PivotTableUI, CSS, provide array data, and render with state management.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}