This guide will help you run a sample Next.js project from GitHub. It is a ready-to-use application with several live Flexmonster demos. Get the sample project to try out Flexmonster.
To integrate Flexmonster into an existing Next.js project, see integration with Next.js.
npm install -g flexmonster-cli
Download the sample project with the flexmonster create command:
flexmonster create react nextjs -r
This command downloads the Next.js + TypeScript project from GitHub and launches it in the browser. To shut down the project from the console, press Ctrl + C (Control + C on macOS).
The sample project is located inside the flexmonster-react-nextjs-project/ folder in your current working directory.
Our sample project was created using create-next-app, so most of the project’s files are typical of projects created this way.
Now take a look at the files specific to our sample project:
src/UIElements/ — routes, menus, and toggle elements used in the sample project.src/app/ — demos that cover different aspects of Flexmonster usage in React:pivot-table-demo/page.tsx)handling-events/page.tsx)using-api-calls/page.tsx)updating-data/page.tsx)customizing-toolbar/page.tsx)customizing-grid/page.tsx)with-highcharts/page.tsx)with-amcharts/page.tsx — amCharts 5; with-amcharts4/page.tsx — amCharts 4)Learn more about how these demos work: Usage examples.
Integrate into an existing Next.js project or adjust the sample project to your needs: