Skip to content

Registry

What the Silkware registry holds, how to install from it, update what you installed, and how to host it.

The registry is how the Silkware Design System reaches your project. It follows the shadcn registry format, so the shadcn CLI and the shadcn MCP server can list, search and install from it. Nothing is a dependency: each item copies source files into your project and you own them.

What it holds

TypeItemsNames
Theme1theme
UI components63One per file in components/ui: button, field, sidebar, menubar, sonner
AI patterns21ai- and the slug: ai-chat, ai-tool, ai-prompt-input
Brand3brand-logo, brand-arrow, state-square
Hooks and helpers5use-mobile, use-highlighted-code, utils, highlighter, ai-lib
Markdown renderer1markdown
Typeset1typeset: the stylesheet for rendered text and its three presets. Brought by theme and markdown, or added alone
BlocksOne per folder in registry/blocksdashboard-01, settings-01
Agent rulesPresent when the skill and the AGENTS.md template existsilkware-skill, silkware-agents

Every item has a title and a one-sentence description. Search matches on both.

Items list what they need. dependencies holds the npm packages that the source imports, and registryDependencies holds the other @silkware items it imports. Adding sidebar also adds button, input, separator, sheet, skeleton, tooltip and the use-mobile hook.

Install

Add the namespace once, then install by name:

pnpm dlx shadcn@latest registry add "@silkware=http://localhost:3000/r/{name}.json"pnpm dlx shadcn@latest add @silkware/button

List and search without installing:

pnpm dlx shadcn@latest search @silkware --query sidebarpnpm dlx shadcn@latest view @silkware/button

Preview what an install would write:

pnpm dlx shadcn@latest add @silkware/dialog --dry-run

The full start-to-finish route is on the Installation page.

Update

An installed file is yours. To see how it differs from the registry, ask for a diff:

pnpm dlx shadcn@latest add @silkware/button --diff

Pass --overwrite to replace your copy with the registry version. Commit or stash your changes first, because the replacement discards local edits.

Update from @silkware only. When shadcn changes a component, the change is taken into Silkware first, checked against the theme and the recorded fixes, and released; the diff above then shows it. Adding the component again from shadcn's own registry skips those checks and drops Silkware's fixes.

When the registry does not have it

Silkware covers shadcn's whole component catalog, so this is rare: a component shadcn released after the last Silkware release. Ask for it to be added. If you cannot wait, install the official one:

pnpm dlx shadcn@latest add <name>
  • Your components.json must have the style aria-vega, so you get the React Aria version.
  • Do not pass --overwrite. The component's dependencies are Silkware files you already have, and the CLI must leave them alone.
  • Style it with tokens only, and note it under an Outside Silkware heading in your AGENTS.md. When Silkware has it, replace it with pnpm dlx shadcn@latest add @silkware/<name> --overwrite and remove the note.

Never install a Radix or Base UI version of a component next to Silkware's, or a component from another registry: it brings a second primitive library into the project.

Customise

  • Brand changes go in app/globals.css. Edit the brand primitives and the semantic tokens and every component follows. See Theming.
  • Component changes go in your copy of the file. Keep them small and record why, so that a later diff is readable.
  • The theme item replaces the whole of app/globals.css. Install it once at the start; after that, edit the file by hand or export a new one from the theme editor.

Fonts

A registry item carries text only, so the two font files cannot travel inside the theme item. The theme item's docs field prints the copy commands after install, and the Installation page lists them. The files are served by this site under /fonts/. Self-hosting them in public/fonts keeps your application free of a run-time dependency on the registry host.

Host it

The registry is generated, never hand-written. Two commands produce it from the files in the repository:

pnpm registry:build

registry:build runs scripts/build-registry.mjs, which writes registry.json from the files on disk, and then shadcn build, which writes one public/r/<name>.json per item plus public/r/registry.json. The MCP server reads that index.

The site URL comes from one constant in lib/site.ts. It defaults to http://localhost:3000 and is overridden by NEXT_PUBLIC_SITE_URL. Set the variable when you build, so that the registry homepage and the font commands carry the production address:

NEXT_PUBLIC_SITE_URL=https://design.example.com pnpm registry:build

Deploy the site as usual and consumers point @silkware at https://design.example.com/r/{name}.json. Generate public/r as a step before the site build, because it is derived output and is not kept in version control.

Blocks are picked up automatically: add a folder under registry/blocks/<name>/ with a page.tsx and any sibling files, then run registry:build. The page installs to app/<name>/page.tsx and the siblings beside it. An optional block.json in the folder sets title, description and categories.

Check the catalog before you publish:

pnpm check:catalog

Private use

To keep the registry inside your company, host it behind authentication and send a header from components.json. Environment variables in ${NAME} form are expanded from your environment.

{  "registries": {    "@silkware": {      "url": "https://design.internal.example.com/r/{name}.json",      "headers": {        "Authorization": "Bearer ${SILKWARE_REGISTRY_TOKEN}"      }    }  }}

Keep the token out of components.json itself and out of version control.