Vvcare/ui
Documentation menu

Components

Getting Started

CLI & Namespaces

Everything is the standard shadcn CLI. vcare/ui only supplies the JSON it reads.

add

Installs one or more items, plus everything they depend on.

npx shadcn@latest add @vcare/button @vcare/card

An item can be named three ways: by namespace (@vcare/button), by URL (https://ui.vcarehms.com/r/button.json), or by local path to a built JSON file.

view, search, list

Inspect a registry before installing from it.

npx shadcn@latest view @vcare/button
npx shadcn@latest search @vcare --query card
npx shadcn@latest list @vcare

view prints the resolved item, including file contents. search and list read the registry index at /r/registry.json.

Namespaces

A namespace maps a short name to a URL template in components.json:

components.json
{
  "registries": {
    "@vcare": "https://ui.vcarehms.com/r/{name}.json"
  }
}

You can register several. This is how a team mixes vcare/ui with its own private registry. Registry items reference each other with the same syntax, which is why the button entry lists @vcare/utils as a dependency.

Private registries

A namespace entry can also be an object with headers or query params. Values written as ${VAR} are read from environment variables, so tokens stay out of the repo.

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

build

Used by registry authors, not consumers. Reads registry.json and writes one JSON file per item.

npx shadcn@latest build -o public/r

Overwrites

add asks before overwriting an existing file. Use your version control diff to review upstream changes, which is the upgrade story for copied code.