chartcn

Installation

How to consume chartcn registry items with shadcn add.

Prerequisites

  • A project already set up with shadcn/ui (components.json)
  • chart and usually card from the official registry
npx shadcn@latest add chart card

Host URL

Public host is TBD. Use an environment placeholder:

VariableExample
CHARTCN_REGISTRY_URLhttps://chartcn-web.vercel.app
Local demohttp://localhost:3000

Install form:

npx shadcn@latest add https://chartcn-web.vercel.app/r/<name>.json

Endpoints (demo app)

PathPayload
/r/registry.jsonIndex of all items + install hints
/r/<name>.jsonBuilt registry item (files include content)

Source of truth in-repo: apps/web/registry/registry.json and apps/web/registry/items/*.json.

Namespace (optional later)

A namespaced address such as @chartcn/chart-area-stacked can be wired once the host is registered in components.json → registries. Until then, prefer full URLs.

On this page