Getting Started uilabs.config.json

uilabs.config.json

The uilabs.config.json file contains the configuration for your project.

It helps us understand how your project is structured and allows us to generate components tailored to your setup.

You can create a uilabs.config.json file in your project by running the following command:

npx uilabs-cli init

$schema

You can see the JSON Schema for uilabs.config.json here.

{
  "$schema": "https://uilabs.app/schema.json"
}

rsc

Whether or not to enable support for React Server Components.

The CLI automatically adds a use client directive to client components when set to true.

{
  "rsc": `true` | `false`
}

tsx

Choose between TypeScript or JavaScript components.

Setting this option to false allows components to be added as JavaScript with the .jsx file extension.

{
  "tsx": `true` | `false`
}

aliases

The CLI uses these values and the paths config from your tsconfig.json or jsconfig.json file to place generated components in the correct location.

Path aliases have to be set up in your tsconfig.json or jsconfig.json file.

aliases.components

Import alias for your components.

{
  "aliases": {
    "components": "@/components"
  }
}