# Getting started

Install your first components in a Vite or Next.js app.

## 1. Prepare your app

Use an existing Vite React TSX app or Next.js App Router TSX app with Tailwind CSS v4 already working. Run the installer with Node 24.19.0 or a newer Node 24 release. Open a terminal in the app folder containing `package.json`.

The CLI supports npm, pnpm, Yarn, and Bun projects. It keeps the app’s package manager. Workspace projects and React Native are outside the current installer scope.

Already have shadcn components? Follow [the existing-project instructions](https://ombelle-ui.com/docs/installation.md#existing-projects) to merge a theme and resolve component conflicts deliberately.

## 2. Create a project preset

1.  Open the [preset editor](https://ombelle-ui.com/editor/preset). A fresh draft starts in Ombelle.
2.  Choose a style family, edit light and dark colors, and adjust typography and shape.
3.  Wait for the current draft to compile. Open **More actions → Download JSON** and save the file as `project-preset.json` in your app folder.

You can also use **Get code** to publish a preset, then use the exact `ps_…@1` code instead of the local JSON path in the next command. Publication is public and explicit; downloading needs no account or publication.

## 3. Initialize Ombelle

```sh
npx @ombelle-ui/cli@1.1.2 init --preset ./project-preset.json
```

Review the proposed configuration, token CSS, style CSS, and lock file, then accept the plan. The preset is saved as `ui-preset.json` and installation provenance as `ui-library.lock.json`. The CLI reports the actual paths it manages.

To inspect the plan without writing files or installing dependencies, append `--dry-run`. You can add `--json` for machine-readable output.

## 4. Add and use components

```sh
npx @ombelle-ui/cli@1.1.2 add button card input label
```

Later additions use the saved project preset. Import the generated components using your configured aliases; the example below assumes `@/components/ui`.

```tsx
import { Button } from '@/components/ui/button'

export function SaveAction() {
  return <Button>Save changes</Button>
}
```

Start your app using its existing dev command. Check light and dark rendering, keyboard focus, and disabled or invalid states. The catalog's specimens for each built-in preset are checked automatically in Chromium for focus visibility, target size, forced colors and axe rules; your app still needs its own checks with your content and backdrop. Next.js interactive examples belong in a client component. Each [component reference](https://ombelle-ui.com/components) includes usage and its supported API.

## 5. Customize and keep your work

Use [global presets](https://ombelle-ui.com/docs/presets.md) for shared project defaults and [component recipes](https://ombelle-ui.com/docs/component-editor.md) for an independently styled component. Generated source remains editable in your repository. Commit the generated files, saved preset, and lock file with your app.

The editors save drafts in this browser. Download JSON for a portable backup; a local draft does not automatically appear in another browser or device.

---

For agents: install with the published CLI, never by hand-copying source. The full install rules are at https://ombelle-ui.com/llms.txt.
