Integrating React with Bloomreach
Integrating a React design system with Bloomreach Content requires mapping CMS component types to front-end UI components via the Bloomreach SPA SDK, passing document models as props while maintaining in-context editing in Experience Manager.

The Bloomreach Delivery API serves structured page models as JSON, which your React application consumes through the SPA SDK to render design system components directly. This approach decouples content authoring from presentation, allowing both developers and editors to work independently.
How mature is your CRM setup?
Find out in minutes with a free CRM maturity check.
Connect React Design Systems to Bloomreach Content via SPA SDK
Installing the Bloomreach React SPA SDK and initializing the BrPage container enables your application to map CMS page models to UI components. Begin by installing the SDK package in your React application, then configure the BrPage wrapper component around your page layout. This wrapper connects to your Bloomreach environment and retrieves page model data from the Delivery API Pages endpoint.
The BrPage container holds a layout tree containing containers and components. Each component in this tree references either inline content or a document stored in Bloomreach Content. Your React application receives this tree structure and uses it to determine which design system components to render and with what data.
Initialize the SDK with your Bloomreach environment configuration, including the API host and page path. The page model arrives as JSON with a hierarchical structure that mirrors your page layout. Your application then iterates through this tree, matching component names to design system component imports and passing the retrieved content as props.
Map Content Document Types to Front End Design System Props
Creating adapter layers that normalize Bloomreach document fields into design system component prop interfaces ensures consistent, type-safe rendering. Define a mapping between each Bloomreach Content document type and its corresponding design system component. For example, a Banner document type in Bloomreach might contain fields for headline, description, background image, and call-to-action text.
Your adapter layer reads these fields from the Bloomreach document model and transforms them into the exact prop shape your design system component expects. If your Card component expects props named title, description, and imageUrl, the adapter maps the Banner document’s headline field to title, description to description, and background image reference to imageUrl.
Adapters handle data type conversions as well. Bloomreach may return an image as a reference object containing a URL and metadata, while your component expects a simple string URL. The adapter extracts the URL from the reference object. Similarly, rich text fields may need conversion to plain text or HTML depending on your component’s input type.
Build these adapters as utility functions or custom hooks that take a Bloomreach document model as input and return a normalized props object. This separation prevents invalid data from reaching your components and makes testing easier. When a CMS document field contains unexpected data or is missing, the adapter can apply sensible defaults or skip rendering that component entirely.
Synchronize Design Tokens and Styling Variables Across CMS Components
Aligning color, typography, and spacing tokens with configurable component parameters in Bloomreach Content enables design consistency without hardcoding values. Export your design tokens as a JSON file containing all token definitions: colors, font sizes, spacing units, and border radius values. These tokens form a single source of truth for your design system.
In Bloomreach Content, create document type fields that reference these token identifiers rather than storing raw CSS values. For example, instead of storing a hex color code directly, store a token key like color-primary-blue. Your React application imports the token JSON file and resolves token keys at render time, applying the correct CSS variable or value to each component.
This approach allows content editors to select approved design tokens from a dropdown list in Experience Manager without needing to know CSS syntax. When a designer updates a token value in the token JSON file, all components using that token automatically reflect the change across the entire application. No CMS reconfiguration required.
Configure your Bloomreach document types with dropdown or radio button fields that list available token identifiers. Document which tokens apply to which fields in your content modeling guidelines. Your adapter layer then maps these token selections to actual CSS variable names or token values when rendering components.
How mature is your CRM setup?
Find out in minutes with a free CRM maturity check.
Configure Storybook Component Libraries with Bloomreach Content Models
Mocking Bloomreach Page Model API responses in Storybook isolates component rendering from live CMS data, enabling reliable testing and documentation. Create mock page model objects that mirror the JSON structure returned by the Bloomreach Delivery API Pages endpoint. These mocks represent different content scenarios: a hero banner with all fields populated, a card with missing optional fields, or a grid with multiple items.
In your Storybook stories, import these mock page models and pass them through your adapter layers to generate component props. This workflow tests both the adapter logic and the component rendering in isolation. You verify that your adapter correctly transforms Bloomreach data into component props before deploying to production.
Define separate stories for each component variant: a Button story with different text lengths, a Card story with and without images, a Grid story with varying item counts. Each story uses a mock Bloomreach document that represents a real authoring scenario. When a new field is added to a Bloomreach document type, you add a corresponding mock story to verify the adapter handles it correctly.
Document the expected Bloomreach document structure for each component in your Storybook stories. This serves as a contract between your content modeling team and your development team. If a content model changes, the affected Storybook stories immediately show whether the adapter needs updating.
Enable In Context Editing in Experience Manager with SPA SDK
Integrating BrManageContentButton overlays allows content editors to edit components visually in preview mode without leaving the Experience Manager interface. The Bloomreach React SDK provides the BrManageContentButton component, which renders an edit button over any content area in your application. When an editor clicks this button, Experience Manager opens an editing panel for that specific document.
Wrap your design system components with BrManageContentButton, passing the document model as a prop. The button appears only when your application is in preview or edit mode within Experience Manager, not in production. The SDK handles the bidirectional communication between your React application and Experience Manager using the postMessage protocol.
This integration preserves your design system styling throughout the editing workflow. Editors see the component rendered exactly as it appears to end users, with all design tokens and responsive behavior intact. They edit the content, and the preview updates in real time without code redeployment.
Our experience at Voxwise implementing this layer across multi-channel setups shows that proper button placement and clear visual feedback significantly improve editor adoption. Position edit buttons consistently across all component types and ensure they don’t obscure critical content.
Scale Headless Design System Component Registries in Bloomreach
Managing centralized component mapping registries and document type schemas across multi-channel headless setups requires clear governance and versioning. Build a component registry as a JavaScript object or configuration file that maps Bloomreach component type names to React component imports. This registry serves as the single source of truth for which design system component renders for each CMS component type.
Version both your component registry and your Bloomreach document type schemas together. When you add a new component type to Bloomreach, add a corresponding entry to the registry at the same time. Document the mapping in a shared location accessible to both development and content modeling teams.
As your design system grows, maintain backward compatibility by supporting multiple versions of a component. A Button component might have v1 and v2 variants. Your registry can map different Bloomreach component types to different Button versions, allowing gradual migration of content without simultaneous updates.
Implement registry validation in your build process to catch unmapped component types before deployment. If a page model references a component type that doesn’t exist in your registry, your build should fail with a clear error message. This prevents silent failures where components fail to render in production.
For multi-channel delivery, create separate registries for each channel if needed. A mobile web application might use a simplified set of components compared to desktop. Document which registries apply to which channels and maintain consistency in component naming across all registries.
Architecture Comparison: Design System Component Mapping
| Architecture Layer | Technical Component | Bloomreach Content Entity | Primary Function |
|---|---|---|---|
| SPA Component Registry | JavaScript object mapping component type names to React imports | Component type definitions in Content Type Editor | Routes page model components to correct design system UI components |
| Prop Adapter Layer | Utility functions transforming document fields into component props | Document type fields and field configurations | Normalizes CMS data structure into shape expected by design system components |
| Authoring Overlay Layer | BrManageContentButton wrapper components in React | Document models served via Page Model API | Enables visual editing of component content in Experience Manager preview mode |
FAQ
Bloomreach Content provides dedicated SPA SDKs for React, Angular, and Vue to render headless page models. Each SDK follows the same core pattern of retrieving page models from the Delivery API and mapping them to framework-specific components, so your integration approach remains consistent across frameworks.
Bloomreach Content document types can include fields for grid layout parameters such as column count, gaps, and alignment. Your adapter layer maps these fields to CSS Grid or Flexbox properties in your design system components, allowing editors to configure responsive behavior through the CMS without touching code.
Design tokens themselves are managed in your token JSON file or design tool, not in Bloomreach Content. However, you can store token identifiers in Bloomreach document fields, allowing editors to select which tokens apply to each component. When you update a token value in your token file, all components referencing that token automatically use the new value.
If the page model references a component type that doesn’t exist in your component registry, your application will fail to render that component. Implement validation in your build process to catch unmapped types before deployment, and include a fallback error boundary component that displays a clear message about the missing mapping rather than crashing the entire page.
Get Your Integration Right
Your design system and Bloomreach Content architecture must align from the start to avoid costly refactoring later.
Voxwise helps teams audit their component mapping strategies, validate adapter layer implementations, and configure Experience Manager editing controls for maximum editor productivity.