Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Next.js starter that connects a blog site to Sitecore XM Cloud via JSS, with headless SXA components.

Astro landing page starter with gradient background, responsive hamburger/dropdown menu, and switchable floating/fullscreen headers.
The Sitecore XM Cloud Next.js Starter is a Vercel-maintained Next.js example that connects a front-end site to Sitecore XM Cloud through the Sitecore JavaScript Rendering SDK (JSS), including example components and headless SXA configuration.
This starter is a Next.js application that renders content from a Sitecore XM Cloud project. It uses the Sitecore JavaScript Rendering SDK (JSS) to fetch data and includes example components plus headless Sitecore Experience Accelerator (SXA) configuration. The template is distributed as part of Vercel's next.js examples repository and can be bootstrapped with create-next-app. It outputs a blog-style site that depends on a Sitecore XM Cloud backend for its content and layout.
npx create-next-app --example cms-sitecore-xmcloud, or with Yarn or pnpm equivalents.After bootstrapping with create-next-app, you configure the starter by setting five environment variables: JSS_APP_NAME (the JSS app name configured in XM Cloud), GRAPH_QL_ENDPOINT (the Sitecore Experience Edge GraphQL endpoint), SITECORE_API_KEY (the Sitecore API key), SITECORE_API_HOST (the Sitecore API host), and FETCH_WITH (GraphQL or REST). Then, running the Next.js dev server or deploying to Vercel makes the app request content from Sitecore and render it as a website.
The starter template itself is open source and free to use, distributed through Vercel's next.js examples repository. Running it requires a Sitecore XM Cloud subscription and, if you deploy to Vercel, that platform's hosting costs apply.
Headless Sitecore Experience Accelerator (SXA) is Sitecore's set of site-building features that work with headless implementations. This starter includes example components and configuration for headless SXA so you can see how SXA sites integrate with a Next.js front end.
No. The Next.js app needs a Sitecore XM Cloud project to supply content, layout, and the JSS app name. Without the XM Cloud environment variables (JSS_APP_NAME, GRAPH_QL_ENDPOINT, SITECORE_API_KEY, SITECORE_API_HOST), the site cannot fetch anything to render.
Yes. The FETCH_WITH environment variable accepts either GraphQL or REST, letting you choose how the Next.js app communicates with the Sitecore API.
