Publish an item

Share code, assets and other text files from the pmndrs repo that owns them, with a shadcn registry.

Summary

Publish an item from the repo where you use it. A root registry.json makes a public GitHub repo installable through shadcn.

An item can contain a component, a utility, a shader, an SVG or documentation. Keep one source of truth: promote it to the design-system when a second repo reuses it; until then, its original repo owns the files.

Define the item

Add a registry.json at the root of your repo. Each item lists its files, their destination and any dependencies. For example, put an SVG at registry/mark/mark.svg and publish it as an asset:

registry.json
{
  "$schema": "https://ui.shadcn.com/schema/registry.json",
  "name": "pmndrs-<repo>",
  "homepage": "https://github.com/pmndrs/<repo>",
  "items": [
    {
      "name": "mark",
      "type": "registry:item",
      "files": [
        {
          "path": "registry/mark/mark.svg",
          "type": "registry:file",
          "target": "~/public/<repo>/mark.svg"
        }
      ]
    }
  ]
}

Replace <repo> with your repo name. registry:file copies the SVG unchanged; ~/ makes the target relative to the project root. This example uses public/ for a project that serves assets there. Choose a target that matches the consumer.

Choose the item and file types for what you ship. Plain JavaScript, Vue files and assets can use explicit file targets; UI code must match the framework and tooling of the project receiving it. List npm packages under dependencies and other registry items under registryDependencies, only when your item needs them.

Refs are not inherited: pin each GitHub registry dependency to its own tag, branch or commit.

Validate and install

Validate the registry locally:

pnpm dlx shadcn@latest registry validate ./registry.json

Push the registry and its files to GitHub, then install in a project using its repo, item name and ref:

npx shadcn@latest add pmndrs/<repo>/mark#v1.0.0

A GitHub registry needs no hosting server. Use a release tag for a reproducible install. See shadcn's GitHub registry guide for the full workflow.

Add it to the catalog

In pmndrs/design-system, add your repo and ref to registry/external.json, then refresh the committed snapshot:

pnpm run refresh-catalog

The getting-started catalog is generated from that snapshot and this repo's registry. Edit the registry sources rather than the table.