components.json

Configuration reference for your Stera UI project.

The components.json file is created by stera-ui init and controls how components are installed into your project.

Schema

{
  "$schema": "https://ui.stera.sh/schema.json",
  "version": 1,
  "css": "src/styles/globals.css",
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui",
    "lib": "@/lib",
    "hooks": "@/hooks"
  }
}

Options

css

The path to your project's main CSS file. Stera UI will create a stera-ui.css file alongside it containing the design tokens.

aliases

Path aliases that map to directories in your project. These must match your tsconfig.json paths configuration.

AliasDefaultDescription
components@/componentsGeneral components directory
utils@/lib/utilsPath to the cn() utility
ui@/components/uiWhere UI components are installed
lib@/libLibrary/utility directory
hooks@/hooksCustom React hooks

Import paths in component source files are automatically rewritten to match your configured aliases when you run stera-ui add.