Part 7 of 7. All parts: part 1. Previous: part 6, using an atom from a normal component.
This part covers the developer side of site-level theming: the one setting you turn on, and what changes when you do. The code is the part-7-theming tag of the companion repository, on top of part 6.
To see the end result of this part, clone the companion repository and check out its tag:
| 1 | git clone https://github.com/rhockUxbee/sitecoreai-content-sdk-nextjs-app-router-atoms-beta.git |
| 2 | cd sitecoreai-content-sdk-nextjs-app-router-atoms-beta |
| 3 | git checkout part-7-theming |
Preliminary post. Written with AI assistance and run locally against the starter. Tested with Content SDK beta build 20261105114751, November 2026. Uxbee has requested Early Access to atoms in SitecoreAI but does not have it yet, so for the moment the Design Studio steps come from Sitecore's documentation and are untested. These posts will be updated once we have access. More in part 1.
What this part does
Find out what a developer has to do for themes when building atoms, and be clear about what is still unknown. The short version: one line of config turns on the plumbing, and nothing I could find explains how an atom uses a theme.
1. Three settings that are easy to confuse
Sitecore's page "Configure styling for atom-based components" lists three settings that all sound like styling. They are independent: turning on one does not turn on another.
| Setting | Where it lives | What it does | In the starter |
|---|---|---|---|
stylingSolution | the atoms catalog | tells Design Studio whether the app uses Tailwind classes or inline CSS; it does not register a compiler | not set; I set it to 'tailwind' in part 2 |
Tailwind compiler and compileCssAction | instrumentation-node.ts and Providers.tsx | compiles the class names that appear only in layouts, at runtime | already wired |
theming.mode | sitecore.config.ts | whether the SDK adds the site-level design-token stylesheet | present as a default of none |
stylingSolution- Where it lives
- the atoms catalog
- What it does
- tells Design Studio whether the app uses Tailwind classes or inline CSS; it does not register a compiler
- In the starter
- not set; I set it to
'tailwind'in part 2
compileCssAction- Where it lives
instrumentation-node.tsandProviders.tsx- What it does
- compiles the class names that appear only in layouts, at runtime
- In the starter
- already wired
theming.mode- Where it lives
sitecore.config.ts- What it does
- whether the SDK adds the site-level design-token stylesheet
- In the starter
- present as a default of
none
The first two are about the classes an atom uses, and parts 1 and 2 cover them. The third is about themes. Its values are none and site. In site mode the SDK links a stylesheet for the current site, and the starter's layout puts a class on the body. Per the docs, three things must be true for the stylesheet link to appear: theming.mode is site, the layout response contains the site name, and a client Edge context ID is configured.
Sitecore's page also says what the setting does not do: it does not create or assign tokens or token sets in SitecoreAI. That happens elsewhere, and section 3 comes back to it.
2. Turn it on and see what changes
The starter already has the plumbing. src/app/layout.tsx adds the class sc-ds-theme to the body when site theming is on, src/Providers.tsx passes theming to SitecoreProvider, and the editing config route passes it on. The only missing piece is the setting. In sitecore.config.ts:
| 1 | export default defineConfig({ |
| 2 | theming: { |
| 3 | mode: 'site', |
| 4 | }, |
| 5 | redirects: { |
| 6 | appLocalePrefix: 'as-needed', |
| 7 | }, |
| 8 | }); |
I built the project before and after that change and looked at the HTML the build wrote for one page.
theming.mode | Body tag | Theme stylesheet link |
|---|---|---|
not set (none) | <body> | none |
site | <body class="sc-ds-theme"> | https://edge-platform.sitecorecloud.io/authoring/api/v1/themes/delivery/<site>/web-css?contextID=<id> |
theming.modenone)- Body tag
<body>- Theme stylesheet link
- none
theming.modesite- Body tag
<body class="sc-ds-theme">- Theme stylesheet link
https://edge-platform.sitecorecloud.io/authoring/api/v1/themes/delivery/<site>/web-css?contextID=<id>
The link matches the URL pattern in the SDK's own types, with my site name and Edge context ID in place of the two placeholders. It comes after the app's own stylesheet. That is the whole change: one setting, and a class and a link appear.
What else I checked: npx tsc --noEmit passes, npm run build passes, and the atoms are untouched. The lock file did not change, and the Badge and every other atom render as before, because theming is separate from the atoms catalog.
What I did not check: whether the stylesheet at that URL returns anything for my site, what it contains, the editing config response, and the live preview of theme changes in Design Studio. They need a theme to exist in SitecoreAI, and I have no access to do that.
3. What I could not find out
The developer pages describe the switch, and the user pages describe what a marketer does with a theme. What connects the two is not written down anywhere I could read:
- Where the design schema and token sets are made. The docs say they are "prepared by your developers", and that a design schema connects your site's styling to Design Studio. They do not say where a developer writes one, or in what format.
- How an atom uses a token. Nothing says whether a renderer should use CSS variables, special class names or something else. The only documented link is the stylesheet in the head and the class on the body.
- How tokens and Tailwind relate. The Tailwind compiler is described as compiling the class names found in a layout, and nothing says it reads token values.
What this means for the atoms in this series: my Badge uses fixed Tailwind colors such as bg-green-100, and a search of the installed Content Kit atoms finds none of shadcn's color roles (bg-primary, text-foreground and similar). So as written, none of them refers to a theme. Whether a theme can restyle them anyway, I cannot tell. The honest advice for now is to turn site theming on, check that the class and the link appear, and wait for an Early Access environment to find out what a theme changes.
Checklist
- Set
theming.modetositeinsitecore.config.ts, and make sure the Edge context ID is configured. - After a build, check for
sc-ds-themeon the body and theweb-csslink in the head. - Remember that
stylingSolution, the Tailwind compiler andtheming.modeare three separate things. - Do not assume your atoms follow a theme until you have seen it in Design Studio.
That is the end of the series. The companion repository has a tag for each part: part-1-starter, part-2-badge, part-3-content-kit, part-4-folders, part-5-skills, part-6-components and part-7-theming (this post).
If you are in the Early Access program and try this, I would like to hear what you find, especially about how custom atoms and themes work together.







