SwipeUI
DocsCLI

Configuration

components.json and the CLI's environment variables.

components.json

init writes it. It follows the shadcn format, so the shadcn CLI can use the SwipeUI registry too.

components.json
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": false,
  "tsx": true,
  "tailwind": { "config": "", "css": "global.css", "baseColor": "neutral", "cssVariables": true },
  "aliases": {
    "components": "@/components",
    "utils": "@/components/swipeui/lib/cn",
    "ui": "@/components/swipeui/ui",
    "lib": "@/components/swipeui/lib",
    "hooks": "@/components/swipeui/hooks"
  },
  "registries": {
    "@swipeui": "<registry>/r/{name}.json",
    "@swipeui-pro": {
      "url": "<registry>/api/r/pro/{name}",
      "headers": { "Authorization": "Bearer ${SWIPEUI_LICENSE_KEY}" }
    }
  }
}
  • shadcn requires style and baseColor; SwipeUI doesn't use them.
  • The aliases follow your project's path alias.
  • If you already have a components.json (React Native Reusables projects do), init only adds the two registries.
  • ${SWIPEUI_LICENSE_KEY} stays a placeholder: shadcn reads the value from .env.local. The key is never written into this file.

Environment variables

VariablePurpose
SWIPEUI_REGISTRY_URLUse another registry, such as a local one
SWIPEUI_LICENSE_KEYYour Pro licence key

The registry URL comes from SWIPEUI_REGISTRY_URL first, then the @swipeui entry in components.json, then the default, https://swipeui.app.

Keep the licence key in .env.local, which is gitignored and which both this CLI and the shadcn CLI read. Never use an EXPO_PUBLIC_ name for it: those values are bundled into your app.

On this page