Experiences SDK

Experiences SDK is currently available in alpha. It is published to npm. APIs are unstable and subject to change.

What it does

The Experiences SDK is a renderer for Contentful’s Experience Orchestration. The SDK takes the Experience payload from the Experience Delivery API (XDA) and renders it into your application.

The following features are included:

  • Fetch and resolve: fetchExperience calls the XDA and resolves the payload.
  • Server or client: Ships <ServerExperienceRenderer> for server components and <ClientExperienceRenderer> for client-side rendering.
  • Bring your own components: Register your existing design system with defineComponent. Component keys map to componentType.sys.urn segments authored in Contentful.
  • Framework adapters: React (@contentful/experiences-react) and Svelte (@contentful/experiences-svelte) adapters are currently available.

Installation

Install the React adapter:

1npm install @contentful/experiences-react

Install the Svelte adapter:

1npm install @contentful/experiences-svelte

The framework adapter packages export everything you need — the resolver, types, renderer, design utilities, and the Experience Delivery client. The -sdk-core, -design, and -client sibling packages are workspace-internal implementation details.

Next steps

  • Repository — source, examples, and issue tracker.
  • README — end-to-end setup, component registration, preview mode, viewport seeding, async resolveData, and working examples.