Install with the shadcn CLI

MoonUI publishes a shadcn-compatible registry at https://moonui.dev/r. Components are copied into your project as source, the way shadcn/ui works.

Free components (no token)

Add the registry to components.json. Use the plain URL form below: no header, no environment variable.

{
  "registries": {
    "@moonui": "https://moonui.dev/r/{name}.json"
  }
}
npx shadcn@latest add @moonui/button

Do not use the header form below for free items: if MOONUI_REGISTRY_TOKEN is not defined, the CLI fails even for free components.

Pro components (registry token)

  1. Create a token at /dashboard/tokens.
  2. Put it in .env.local:
    MOONUI_REGISTRY_TOKEN=mui_live_xxxxxxxx
  3. Use the header form in components.json:
    {
      "registries": {
        "@moonui": {
          "url": "https://moonui.dev/r/{name}.json",
          "headers": {
            "Authorization": "Bearer ${MOONUI_REGISTRY_TOKEN}"
          }
        }
      }
    }
npx shadcn@latest add @moonui/button-pro

Where a component exists in both editions, the Pro item has a -pro suffix (@moonui/button is free, @moonui/button-pro is Pro). Without a valid token, Pro items return 401. Your plan limits how many devices (token seats) can be active.

Good to know

  • Tailwind v4 only for the theme. MoonUI color tokens are delivered as a @moonui/theme item that targets Tailwind v4. On Tailwind v3 the components are copied, but you must define the color tokens yourself.
  • Pro in Phase 1 is a wrapper. Pro items re-export from the @moontra/moonui-pro package rather than shipping the full source, so that package is installed as a dependency.
  • Browse all items: /r/registry.json.