Skip to main content

Installation

From npm

npm install stacgis-ai-react
# peer dependency: react ^18 || ^19

Import the stylesheet once in your entry point — it is required:

import "stacgis-ai-react/dist/index.css";

From source (this repository)

cd frontend
npm install
npm run build # build the library (dist/ → ESM + CJS + d.ts + CSS)

# run the demo app
cd example
npm install
npm run dev # http://localhost:3000 — pair with the backend example app

The example app imports the components directly from ../src for hot-reloading, so you don't need to build the library to develop against it.

Project scripts

ScriptDescription
npm run buildType-check + build ES/CJS + d.ts + CSS to dist/
npm run devVite dev server for the library
npm run exampleRun the demo app (example/)
npm run previewPreview the production library build