@cratis/components.primereact
PrimeReact 11 adapter for the nine stable presentation slots in the Cratis Components renderer ABI
v1. The package shares the Components repository release version while the renderer ABI remains
versioned separately. It exports one stable CratisPresentationUiLibrary manifest,
primeReactUiLibrary. This certifies nine-slot primitive
adaptation, never full-catalog replacement. PrimeReact 10 is supported separately by
@cratis/components.primereact10.
Versions: each release of
@cratis/components.primereactis published at the same version as@cratis/componentsand declares a peer on exactly that version. Install and upgrade the two packages together at the same version.
Install
npm install @cratis/components.primereact@^4 @cratis/components@^4 \
@primereact/core@^11 @primereact/ui@^11 primereact@^11 \
@primeuix/themes@^3 react@^19 react-dom@^19
Node-based build, test, and server-rendering environments require Node.js 22 or newer.
The adapter uses PrimeReact 11 styled components. It covers Button, IconButton, TextInput, TextArea, Checkbox, Radio, Switch, ProgressBar, and Surface. The five atomic interaction slots are not part of this profile.
Application-owned provider and license
PrimeReact 11 requires a license key. The application owns that key and passes it directly to its
outer PrimeReactProvider; Components never receives, stores, copies, logs, serializes, or proxies
it. PrimeReact's runtime context deliberately omits the key, so the application also passes one
non-secret boolean attestation to CratisComponentsProvider.
import { PrimeReactProvider } from '@primereact/core/config';
import Aura from '@primeuix/themes/aura';
import { CratisComponentsProvider } from '@cratis/components';
import { primeReactUiLibrary } from '@cratis/components.primereact';
const primeUiLicenseKey = import.meta.env.VITE_PRIMEUI_LICENSE_KEY;
export const Application = () => (
<PrimeReactProvider license={primeUiLicenseKey} theme={{ preset: Aura }}>
<CratisComponentsProvider
value={{ locale: 'en-US' }}
library={primeReactUiLibrary}
rendererSetup={{
'cratis-primereact.license-configured': Boolean(primeUiLicenseKey),
}}
>
<main>Application content</main>
</CratisComponentsProvider>
</PrimeReactProvider>
);
Components that execute commands or run queries also need Arc's <Arc> provider from
@cratis/arc.react around this tree; neither the adapter nor CratisComponentsProvider replaces it.
The adapter throws CRATIS-UI-1005 synchronously when either the outer provider or the attestation
is absent. Setting the attestation to true is an application assertion that the key was actually
supplied; it is not a substitute for doing so. This prevents Components from creating a second
provider and fails before adapter content when setup was not attested. The adapter does not validate
the key and cannot guarantee that PrimeUI will accept it or omit its own license notice.
For development without a key, select the built-in Core renderer explicitly
instead of selecting this adapter; a missing attestation never triggers a license fallback.
Obtain a key from PrimeUI. For Vite, expose the application-owned
key as VITE_PRIMEUI_LICENSE_KEY only in the client build that mounts PrimeReact. In CI or a
publishing pipeline, map a protected PRIMEUI_LICENSE_KEY secret into that build variable without
echoing it or writing it to package artifacts. The adapter package itself reads no license
environment variable and includes no key.
Styling and SSR
The application chooses the PrimeReact theme on its outer provider. The package's static metadata
uses VITE_PRIMEUI_LICENSE_KEY only as documentation/discovery metadata; no runtime lookup occurs.
All nine slots produce deterministic SSR output, and the representative Button fixture hydrates
without a mismatch. The host remains responsible for PrimeReact's provider, theme, CSP, and style
collection/injection requirements.
Peer policy
PrimeReact packages are bounded to >=11 <12, PrimeUX themes to >=3 <4, and React/ReactDOM to
React 19. Vendor packages are peers and are never bundled. The packed consumer matrix proves
PrimeReact 11.0.0 and 11.2.0 with @primeuix/themes 3.0.0; the adapter's own build and tests use
11.1.0.
The source manifest declares @cratis/components >=4 <5, the Components major whose renderer ABI
and stable presentation profile the adapter implements. The release step replaces that range with
the exact release version, so a published adapter requires the @cratis/components release it
shipped with.
See CONFORMANCE.md for bounded evidence and THIRD_PARTY_NOTICES.md for upstream licensing.