Getting Started

Set up a new RDC UI project and install your first component.

There are two ways to set up an RDC UI project: let an LLM do it using skills (Setup with AI), or configure everything yourself (Manual Setup). Afterwards, see Add Components for adding components to your project.

Setup with AI

Recommended. A skill scaffolds the project and configures all RDC UI specifics for you.

Install the rdc-ui-create skill

Install the skill globally, once. It is then available in every VSCode workspace:

npx skills add "https://dev.azure.com/Bovemij/RDC%20Shared/_git/ai" --skill rdc-ui-create -a github-copilot -g -y

Prompt the LLM

  1. Open VSCode.
  2. Open the AI Chat.
  3. Select a cheap model, for example Haiku.
  4. Prompt it, for example:

Setup an RDC-UI project

The skill asks for the absolute project location and a project name. It uses these to scaffold the shadcn project fundamentals and then configures the RDC UI specifics.

Manual Setup

Configure everything yourself using the CLI. Use this if you can't or don't want to use the AI setup.

Open a terminal

Use a terminal (or the VSCode integrated terminal) at the location where you want the project to be created.

Scaffold a new shadcn project

Sets up a Vite + React project with shadcn/ui and Base UI primitives.

npx shadcn@latest init --preset bKsE4ONE --template vite

VSCode setup

Open the project

Open VSCode in the newly created project folder.

Set up the shadcn MCP server

Open a terminal in VSCode and run:

npx shadcn@latest mcp init --client vscode

Update components.json

Add the RDC UI registry namespace:

components.json
{
  "registries": {
    "@rdc-ui": "https://ui.rdc.nl/r/{name}.json"
  }
}

Install the RDC UI style and theme

The style includes RDC brand colors, typography (GT Walsheim Pro), and design tokens. This is a prerequisite before adding any components:

npx shadcn@latest add "@rdc-ui/css"

Update src/index.css

Remove the @fontsource import and everything below @custom-variant. The file should look like this:

src/index.css
@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";
@import "./css/rdc-ui/index.css";

@custom-variant dark (&:is(.dark *));

Add or update .vscode/settings.json

.vscode/settings.json
{
  "files.exclude": {
    "**/node_modules": true
  },
  "search.exclude": {
    "**/dist": true
  },
  "files.associations": {
    "*.css": "tailwindcss"
  },
  "tailwindCSS.experimental.classRegex": [
    ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
    ["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
  ],
  "js/ts.preferences.importModuleSpecifier": "non-relative",
  "json.schemaDownload.trustedDomains": {
    "https://ui.shadcn.com": true
  }
}

Install project skills

Run the commands one by one:

npx skills add https://github.com/shadcn-ui/ui --skill shadcn -y -a github-copilot
npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-best-practices -y -a github-copilot
npx skills add "https://dev.azure.com/Bovemij/RDC%20Shared/_git/ai" --skill rdc-ui-fundamentals -y -a github-copilot

Add AGENTS.md

Add an AGENTS.md file to the root of the project:

AGENTS.md
# AGENTS.md

RDC-UI project: Vite + React + TypeScript + Tailwind CSS v4 + shadcn/ui on **Base UI**, themed by the RDC registry (`@rdc-ui`).

## Mandatory

- Before writing, changing or reviewing any UI code (React/TSX components, pages, hooks, styling, CSS), load and follow the `rdc-ui-fundamentals` skill. Its rules take precedence over the `shadcn` and `vercel-react-best-practices` skills and over upstream shadcn examples.
- Use the `shadcn` skill for shadcn CLI, MCP and component usage, and `vercel-react-best-practices` for React performance patterns.

## Project facts

- Component config: `components.json` (base `base`, icon library `phosphor`, registries `@shadcn` and `@rdc-ui`).
- Design tokens: `src/css/rdc-ui/core/theme.css` (installed from `@rdc-ui/css`; do not edit).
- shadcn components: `src/components/ui/` (CLI-managed; do not edit).
- Verify changes with `npm run build` and `npm run lint`.

Add Components

Components come from two registries:

  • Core shadcn components (button, input, accordion, etc.) come from the default shadcn registry.
  • RDC UI components (logo, etc.) come from the @rdc-ui registry.

Add Components with AI

You don't need to name components. Describe the feature and its criteria, and instruct the LLM to consult the shadcn MCP server to determine which components are needed and from which registry (default shadcn or @rdc-ui).

Example prompt:

Implement an FAQ section: each item has a title, and the content is collapsed by default and expands when the title is clicked. Only one item may be open at a time.

Use the shadcn MCP server to determine which components to use (check both the default shadcn registry and @rdc-ui). Prefer existing components over custom code. Before adding anything, list the components you chose and why.

The LLM maps this to the accordion component, adds it with the CLI, and builds the FAQ using it.

A good prompt contains:

  • What to build: content, structure and states.
  • Behavior: interactions, constraints and edge cases that influence component choice.
  • Instruction to use the shadcn MCP server and to list the chosen components before adding them.

This works in every chat mode:

  • Ask: returns the recommended components and an implementation outline. Nothing is changed.
  • Plan: includes the chosen components and registries in the plan for you to approve.
  • Agent: adds the components and implements the feature.

Always review the outcome

The LLM decides which components to use. Review its choices thoroughly before approving: are the chosen components the right fit, do they come from the expected registry, and is the result what you intended? In Agent mode, also review the changes to your project afterward.

Add Components Manually

Add core shadcn components without a namespace:

npx shadcn@latest add button
npx shadcn@latest add input accordion

Add RDC UI components with the @rdc-ui namespace:

npx shadcn@latest add @rdc-ui/logo

See the shadcn CLI docs for all add options.

Usage

import Logo from "@/components/logo"

export function Header() {
  return (
    <header>
      <Logo className="h-8 w-auto" />
    </header>
  )
}

What's Installed

When you install a component, the CLI:

  1. Downloads the component source from the registry
  2. Places it in your configured components directory
  3. Installs any npm dependencies it requires
  4. Resolves internal component dependencies

Manual Modifications

Components live in your source code. We recommend not modifying them unless necessary — for example when fixing bugs or when a component needs a specific feature not available in its base implementation. In those cases, prefer creating a new wrapper component around the base component(s).

Last updated on

On this page