npx shadcn@latest initBuild better products faster
Content Kit is a Shadcn based registry to distribute components easily.
Browse through existing components and install what you need in the theme you want.
Browse
Prerequisites
Make sure you have the following tools installed before proceeding:
node --versionnpm --versionStep 1: Initialize shadcn/ui
Run the shadcn/ui initialization command in your project's root folder:
During initialization, choose a base color when prompted. The CLI will then:
- Automatically detect your Vite setup and Tailwind configuration.
- Create a
components.jsonconfiguration file. - Update your CSS with the necessary CSS variables.
- Create
src/lib/utils.jswith utility functions.
Step 2: Install Content Kit components
Install all atoms with a single command:
npx shadcn@latest add https://content-kit.vercel.app/r/atoms.jsonYou can also install each atom individually:
Button Atom:
npx shadcn@latest add https://content-kit.vercel.app/r/button.jsonHeading Atom:
npx shadcn@latest add https://content-kit.vercel.app/r/heading.jsonImage Atom:
npx shadcn@latest add https://content-kit.vercel.app/r/image.jsonNumber Atom:
npx shadcn@latest add https://content-kit.vercel.app/r/number.jsonParagraph Atom:
npx shadcn@latest add https://content-kit.vercel.app/r/paragraph.jsonContainer Atom:
npx shadcn@latest add https://content-kit.vercel.app/r/container.jsonStep 3: Exclude atoms from the Sitecore component map
Atoms and their UI primitives are not layout components. Exclude them in sitecore.cli.config.ts so they are not registered in the generated component map (which can cause name collisions such as duplicate button entries):
Then regenerate the map (for example npm run sitecore-tools:generate-map) so the exclusions take effect.
Step 4: Register the atoms catalog and registry
After install, pass the generated catalog and registry to SitecoreProvider typically in your Providers.tsx file:
Step 5: Deploy to XM Cloud and create a site
Deploy your changes to XM Cloud, then create a site so the installed atoms are available in your environment.
Step 6: Generate an atoms component in Design Studio
After creating a site and opening Design Studio, you can use AI to generate components using atoms. For example, to use the Heading atom, enter the following prompt:
Create a component using Heading atom