Skip to content

Components

React components wired to your proxies

Command dialogs, forms, tables, and application surfaces that consume Arc’s generated proxies. Components owns its public contracts, semantic parts, and built-in renderer, with optional MUI, PrimeReact 11, and PrimeReact 10 adapters released under the repository’s shared version.

Components 4 runs on React 19 with @cratis/arc and @cratis/arc.react >=20.3.1 <23; this repository builds and tests against Arc 22.16.0. After npm install @cratis/components@^4, import the stylesheets once and mount Components’ provider inside Arc’s:

Excerpt: application entry
import 'reflect-metadata';
import '@cratis/components/tokens';
import '@cratis/components/styles';
import '@cratis/components/theme'; // optional built-in baseline
import { Arc } from '@cratis/arc.react';
import { CratisComponentsProvider } from '@cratis/components';
export const App = () => (
<Arc>
<CratisComponentsProvider value={{ locale: 'en-US' }} toaster>
<YourApp />
</CratisComponentsProvider>
</Arc>
);

Getting started walks through the peers, the TypeScript setup, and a first command dialog. The package root is setup-only: import the provider and configuration helpers there, then import every component from its explicit subpath, such as @cratis/components/CommandDialog or @cratis/components/DataTables. The built-in renderer is zero-configuration. Optional renderer packages are selected explicitly; the application retains their provider, peer, SSR, styling, and license responsibilities. Read Renderer adapters and coexistence for the exact nine-slot boundary, direct vendor coexistence, custom composition, unsupported claims, and licensing policy.

Components consumes generated command/query contracts and React contexts from Arc. Applications may use Arc without Components, and Arc does not require event sourcing. Applications that use Chronicle commonly render its projected read models through these surfaces.