Blok

Build better products faster

Blok is Sitecore's design system. It is used for creating industry leading martech applications.
Now, it's publicly available, so that anyone can easily build software in the Sitecore product design language.

Prerequisites

Make sure you have the following tools installed before proceeding:

1
Node.js 16+
node --version
Download
2
npm 10+
npm --version
Learn more
3
TailwindCSS
Installed & configured
Setup guide

Step 1: Initialize shadcn/ui

Run the shadcn/ui initialization command in your project's root folder:

npx shadcn@latest init

During initialization, choose a base color when prompted. The CLI will then:

  • Automatically detect your Vite setup and Tailwind configuration.
  • Create a components.json configuration file.
  • Update your CSS with the necessary CSS variables.
  • Create src/lib/utils.js with utility functions.

Step 2: Install Blok components

You can now start adding the Blok components to your project.

npx shadcn@latest add https://blok.sitecore.com/r/button.json

Step 3: Test your setup

Update your src/App.jsx to test the installation. Components are imported with the @/ alias:

Step 4: Run your application

Start the development server:

npm run dev

Your application is now running with functional Blok components.