Installation
How to install and configure Stera UI in your project.
Prerequisites
- A React project (Next.js or Vite)
- Tailwind CSS v4 configured
- TypeScript (recommended)
Initialize Stera UI
Run the init command in your project directory:
pnpm dlx stera-ui initThis will:
- Detect your project structure (Next.js, Vite,
src/directory) - Create a
components.jsonconfiguration file - Set up the base design tokens (
stera-ui.css) - Install required dependencies (
tw-animate-css)
Add Components
Use the add command to install individual components:
pnpm dlx stera-ui add buttonYou can add multiple components at once:
pnpm dlx stera-ui add button dialog dropdown-menuDependencies are resolved automatically. For example, adding dialog will also install button and utils if they aren't already present.
List Available Components
See all available components with:
pnpm dlx stera-ui listThis shows components grouped by type (ui, style, component, hook, lib) with their registry dependencies.
Project Structure
After initialization, your project will have:
your-project/
├── components.json # Stera UI configuration
├── components/
│ └── ui/ # Your installed components
│ ├── button.tsx
│ ├── dialog.tsx
│ └── ...
├── lib/
│ └── utils.ts # cn() utility function
└── styles/
├── globals.css # Your existing CSS
└── stera-ui.css # Stera design tokens