This tutorial will help you integrate Flexmonster with React. Watch the tutorial in the video format: React pivot table guide.
Flexmonster has a 30-day free trial, with no registration required to start the evaluation. You can also test the component using our sample React project or the React pivot table demo.
If you are using React with Next.js, see Integration with Next.js.
npm install -g flexmonster-cli
Skip this step if you already have a React app.
Step 1.1. Create a React app from the console using Vite. You can choose an ES6 or a TypeScript project template:
# For npm 7 and later npm create vite@latest flexmonster-project -- --template react # For npm 6 npm create vite@latest flexmonster-project --template react
# For npm 7 and later npm create vite@latest flexmonster-project -- --template react-ts # For npm 6 npm create vite@latest flexmonster-project --template react-ts
Step 1.2. Install npm dependencies needed for the project:
cd flexmonster-project npm install
To get Flexmonster for React, run the following command inside your project:
flexmonster add react-flexmonster
This command downloads the react-flexmonster wrapper to node_modules/ and adds it as a dependency to package.json.
Step 3.1. Import Flexmonster styles (e.g., into src/index.css):
@import "flexmonster/flexmonster.css";
Step 3.2. Import the FlexmonsterReact component (e.g., into src/App.jsx):
import * as FlexmonsterReact from "react-flexmonster";
Step 3.3. Insert the FlexmonsterReact.Pivot component (e.g., into src/App.jsx):
function App() {
return (
<div className="App">
<FlexmonsterReact.Pivot
toolbar={true}
/>
</div>
);
}
export default App;The toolbar is one of the FlexmonsterReact.Pivot props. Learn more about the FlexmonsterReact.Pivot component.
Step 3.1. Import Flexmonster styles (e.g., into src/index.css):
@import "flexmonster/flexmonster.css";
Step 3.2. Import the FlexmonsterReact component (e.g., into src/App.tsx):
import * as FlexmonsterReact from "react-flexmonster";
Step 3.3. Insert the FlexmonsterReact.Pivot component (e.g., into src/App.tsx):
function App() {
return (
<div className="App">
<FlexmonsterReact.Pivot
toolbar={true}
/>
</div>
);
}
export default App;The toolbar is one of the FlexmonsterReact.Pivot props. Learn more about the FlexmonsterReact.Pivot component.
Run your application from the console:
npm run dev
Open your project in the browser to see the result.
You can also watch our video tutorial that covers the integration process:
We prepared the following examples of Flexmonster usage:
If you run into any issues during the integration, visit our troubleshooting page.
Can't find your answer?
Visit the FAQ
Flexmonster Pivot Table & Charts is a JavaScript pivot table component for adding interactive reporting and data analysis to web applications. Users can summarize, filter, sort, and explore data in pivot tables and charts, drill into results, and export reports.
Flexmonster works in plain JavaScript and TypeScript projects. It also integrates with React, Next.js, Angular, Vue, Blazor, and other technologies. See all integration options.
Flexmonster supports JSON and CSV files, SQL databases, MongoDB, Elasticsearch, and Microsoft Analysis Services (SSAS). You can also connect other data sources through your own backend. See supported data sources.
Flexmonster offers licenses for internal corporate use, SaaS products, and OEM distribution. Pricing varies by license and plan. SaaS projects can also use the free SaaS Entry license during development. Learn more on the pricing page.
Yes. Flexmonster offers a 30-day free trial that lets you evaluate all its features. No credit card is required. The trial version has a watermark.
To get started with Flexmonster, follow our integration guide.