@mirego/forra-react
v2.3.0
Published
Forra React component library and design system: UI components, hooks, and chat experiences for building AI apps.
Downloads
45
Readme
@mirego/forra-react
Forra's React component library and design system — UI components, hooks, and chat experiences for building AI apps, by Mirego.
Installation
You must install both @mirego/forra-react and its peer dependencies in your project:
@mirego/forra-apireact(v19.x)react-dom(v19.x)axios(v1.9.x)
Using npm
npm install @mirego/forra-react @mirego/forra-api react react-dom axiosUsing yarn
yarn add @mirego/forra-react @mirego/forra-api react react-dom axiosUsing bun
bun add @mirego/forra-react @mirego/forra-api react react-dom axiosUsage
Import and use the ScoutAppProvider (or other components) in your React app:
import {ScoutAppProvider} from '@mirego/forra-react';
function App() {
return <ScoutAppProvider>{/* your app code */}</ScoutAppProvider>;
}Refer to the documentation for more details on available components and configuration options.
Raw design-system components
Raw Forra design-system components (Button, Input, Select, etc.) are available under the ./components/forra subpath:
import {Button} from '@mirego/forra-react/components/forra';Consuming with Vite
The package bundles pdfjs-dist, which ships a web worker that Vite's dependency
pre-bundler (esbuild) cannot process. Exclude it from pre-bundling so Vite resolves
the worker itself:
// vite.config.ts
export default defineConfig({
optimizeDeps: {
exclude: ['pdfjs-dist'],
},
});Without this, the dev server fails to start with
Cannot read file: .../pdf.worker.min.mjs?url.
License
ISC
