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
| Script | Description |
|---|---|
npm run build | Type-check + build ES/CJS + d.ts + CSS to dist/ |
npm run dev | Vite dev server for the library |
npm run example | Run the demo app (example/) |
npm run preview | Preview the production library build |