Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIGetting startedReact

CLI

The registry is a set of JSON files at fixed addresses. shadcn's CLI reads them and writes the components into your app.

Add an item

In an app with a components.json (Installation writes one), pass an item's address to add. The file needs no entry for this registry: the address is the item's whole name. For React:

npx shadcn@4.23.0 add https://hamur.dev/r/react/<name>.json

The pinned version is the one the registry's proof runs. A SvelteKit app uses shadcn-svelte@1.8.0 instead, with the items under /r/shadcn-svelte/.

The Dialog, for example:

npx shadcn@4.23.0 add https://hamur.dev/r/react/dialog.json

What the CLI does

  • It reads components.json for the folders and import aliases, so a file lands where your app imports it from.
  • It fetches the item, then every item named in its registryDependencies, each by its full address (the Dialog pulls utils and button).
  • It writes each file with the registry's imports turned into your aliases, and installs the npm packages the item lists.
  • The theme item writes no file: it adds its tokens, the @theme inline mapping and the base styles to the stylesheet components.json names.

Once written, the files are yours to change. Nothing tracks them afterwards except the version comment each one carries (Versions).

Addresses

Every file sits under https://hamur.dev/r/. <fw> is one of react, vue, svelte, angular and solid. These are the patterns this site serves, with an example of each:

AddressHoldsExampleFiles
/r/<fw>/<name>.jsonThe item at its latest version, in shadcn’s registry-item schema./r/react/dialog.json615
/r/<fw>/<name>@<version>.jsonThe item at one version; the address never changes what it serves./r/react/dialog@0.1.2.json615
/r/<fw>/registry.jsonThe index of the framework’s items, without their file contents./r/react/registry.json5
/r/shadcn-svelte/<name>.jsonThe Svelte item in shadcn-svelte’s schema, at its latest version./r/shadcn-svelte/dialog.json123
/r/shadcn-svelte/<name>@<version>.jsonThe same, at one version./r/shadcn-svelte/dialog@0.1.2.json123
/r/<fw>/<name>.versions.jsonEvery version of the item with its hash, and which one is latest./r/react/dialog.versions.json615

Versions

Each item has a version, and every file it writes names it in a comment, such as hamur/ui dialog@0.1.2. The comment stays when you edit the file, so you know which version you started from. To add exactly that version again, use the address with @<version>; to see what is newer, read the item's versions.json (the React Dialog's, from /r/react/dialog.versions.json):

{
  "name": "dialog",
  "latest": "0.1.2",
  "versions": [
    {
      "version": "0.1.0",
      "hash": "4fcac03a28a1d7815e9cbc67af557e6400fe4435589e8bbbb88122be917d5aea",
      "url": "https://hamur.dev/r/react/dialog@0.1.0.json"
    },
    {
      "version": "0.1.1",
      "hash": "4fcac03a28a1d7815e9cbc67af557e6400fe4435589e8bbbb88122be917d5aea",
      "url": "https://hamur.dev/r/react/dialog@0.1.1.json"
    },
    {
      "version": "0.1.2",
      "hash": "7ef08e0aaad418681c5812d20aedabdb53676896ecb521f09dacd8e3c9e26221",
      "url": "https://hamur.dev/r/react/dialog@0.1.2.json"
    }
  ]
}

Behavior updates do not come through the CLI: they arrive with the headless package, by npm update.