Part 6 of 7. All parts: part 1. Previous: part 5, AI skills and an agent run. Next: part 7, site-level theming.
So far the atoms have been used through Design Studio. This part uses an atom from a normal Sitecore component instead. The code is the part-6-components tag of the companion repository, on top of part 4.
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-6-components |
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
Answer one question: can a normal component, the kind that lives in src/components and is mapped to a rendering, reuse an atom? It can. This part shows the code, what I checked, and what carries over from the atom to the component and what does not.
1. Why an atom can be reused
An atom in the Content Kit layout is two files: a schema (badge.schema.ts) and a renderer (badge.tsx). The renderer is a plain function component. It knows nothing about the registry. The registry only adapts it, in one line per atom: Badge: ({ props }) => <Badge {...props} />.
That means anything that can render a React component can render the Badge, including a normal Sitecore component. Two details make it fit without glue:
- The props are field-shaped. The Badge's text prop uses
textFieldSchema, so it takes the same{ value }object as a Sitecore text field. A field from a rendering'sfieldsgoes straight in. TypeScript accepted the SDK'sTextFieldas that prop without a cast. - The renderer guards itself. If the text is empty, the Badge renders nothing, so the component does not need an
ifaround it.
The other half, the schema, is a normal module too. Part 4's layout keeps it next to the renderer, so a component can import it as well.
2. A component that renders the Badge
The starter has no components of its own, so I added a small one, Teaser, in src/components/teaser/Teaser.tsx. It shows a status label above a title.
| 1 | import { Text, TextField } from '@sitecore-content-sdk/nextjs'; |
| 2 | import { Badge } from 'components/atoms/badge/badge'; |
| 3 | import { badgeCatalogDefinition } from 'components/atoms/badge/badge.schema'; |
| 4 | import { ComponentProps } from 'lib/component-props'; |
| 5 | |
| 6 | type TeaserProps = ComponentProps & { |
| 7 | fields: { |
| 8 | Title: TextField; |
| 9 | Status: TextField; |
| 10 | }; |
| 11 | }; |
| 12 | |
| 13 | const Teaser = ({ fields, params }: TeaserProps) => { |
| 14 | // Reuse the atom's own schema to read the tone from a rendering parameter. |
| 15 | // A missing or unknown value falls back to the schema's default, "neutral". |
| 16 | const parsed = badgeCatalogDefinition.props.shape.tone.safeParse(params.Tone); |
| 17 | const tone = parsed.success ? parsed.data : 'neutral'; |
| 18 | |
| 19 | return ( |
| 20 | <div className={`teaser ${params.styles ?? ''}`} id={params.RenderingIdentifier}> |
| 21 | <Badge text={fields.Status} tone={tone} /> |
| 22 | <h2> |
| 23 | <Text field={fields.Title} /> |
| 24 | </h2> |
| 25 | </div> |
| 26 | ); |
| 27 | }; |
| 28 | |
| 29 | export default Teaser; |
Three things to see in it:
- The imports use the
components/*alias that part 4's layout already relies on. - The Status field is passed to the Badge as it is.
- The tone comes from a rendering parameter and is checked with the atom's own schema:
badgeCatalogDefinition.props.shape.tone. The component does not repeat the list of tones. If someone adds a tone to the atom, the component accepts it without a change.
I rendered it with react-dom/server and made-up field values:
| Tone parameter | Status field | Result |
|---|---|---|
success | New | Badge with bg-green-100 text-green-800, then the title |
bogus | New | Badge with the neutral classes |
| not set | New | Badge with the neutral classes |
| any | empty | no Badge, only the title |
success- Status field
New- Result
- Badge with
bg-green-100 text-green-800, then the title
bogus- Status field
New- Result
- Badge with the neutral classes
- Status field
New- Result
- Badge with the neutral classes
- Status field
- empty
- Result
- no Badge, only the title
I did not create a Teaser rendering, its template or a Tone parameter in SitecoreAI, and I did not render it from real content. What I checked is the code, not the Sitecore side.
3. Register it and build
A normal component is registered through the component map, and nothing about the atom changes that. I ran npm run sitecore-tools:generate-map. It printed Registering Content SDK component Teaser and added two lines to .sitecore/component-map.ts: an import of Teaser and the entry ['Teaser', { ...Teaser }]. The Badge is not in the map, because sitecore.cli.config.ts excludes src/components/atoms/** (part 3 added that). Only the component that uses it is mapped.
The checks, all on the part-6-components tag:
npx tsc --noEmitpasses with exit 0.npm run buildpasses, and its log lists Teaser in the server component map.- The atoms side did not move:
.sitecore/atoms.lock.jsonis unchanged, and.sitecore/metadata.jsoncontains the Badge atom but no Teaser. A normal component is not an atom, so Design Studio does not see it as one.
One detail on styling: Tailwind scans the Badge's file for classes whenever it builds, so a Teaser that imports the Badge gets its classes the same way the registry does. The built CSS contains bg-green-100 and bg-amber-100. That would have been true without the Teaser, since the registry already imports the same file.
4. What carries over and what does not
| Badge as an atom | Badge inside Teaser | |
|---|---|---|
| Registered through | atomsConfig (catalog and registry) | the component map, through Teaser |
| Data comes from | the Document that Design Studio builds | the rendering's fields and parameters |
| Visible to Design Studio's AI | yes, through the catalog | no |
| Marketers place it | in Design Studio | as the Teaser rendering in the usual way |
| Reusable code | the renderer and the schema | the same renderer and schema |
- Badge as an atom
atomsConfig(catalog and registry)- Badge inside Teaser
- the component map, through Teaser
- Badge as an atom
- the Document that Design Studio builds
- Badge inside Teaser
- the rendering's fields and parameters
- Badge as an atom
- yes, through the catalog
- Badge inside Teaser
- no
- Badge as an atom
- in Design Studio
- Badge inside Teaser
- as the Teaser rendering in the usual way
- Badge as an atom
- the renderer and the schema
- Badge inside Teaser
- the same renderer and schema
The last row is the point. The code is shared, and the registration is not. Teaser does not make the Badge an atom, and the Badge does not make Teaser one.
A few consequences:
- One source for the look. Change the Badge's classes or add a tone in one place, and both the atom and Teaser follow.
- Keep the atom files free of the registry. The Badge renderer imports nothing from
src/atoms, so a component can use it without pulling in the catalog. - A component is not an atom. If Design Studio should offer it to the AI, it needs its own catalog entry. The part 5 skills say the same: the create skill hands over to the component-scaffold skill when the user wants a normal rendering under
src/components. - Not tested. I have not seen how Design Studio treats a page that mixes atoms and normal components, and the Teaser has no rendering in SitecoreAI. Everything above is the code and the build.
Next up, part 7: site-level theming.







