Docs

Vite Installation

Vite Installation

Install and configure Vite.

Create a project

Create a new React project using Vite:

npm create vite@latest

Edit tsconfig.app.json file

Add the following code to the tsconfig.app.json file to resolve paths:

{
  "compilerOptions": {
    // ...
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
    // ...
  }
}

Add Pigment CSS

Components are styled using Pigment CSS and you need to install it in your project.

Follow the Pigment CSS installation instructions to get started.

Initialize the CLI

Run the lotru init command to setup your project:

pnpm dlx lotru@latest init

Configure lotru.config.json

You will be asked a few questions to configure.

- What framework are you using?
- Would you like to use TypeScript?
- Is your source code located in a src directory?

Add your first component

You can now add components to your project:

npx lotru@latest add ui/button