# Visual AI UI editing for React Router

> Visually edit a React Router 7 or 8 framework mode app with AI. Add guijam() before reactRouter() for live UI variants and source-mapped edits.

Edit the UI of your React Router app by drawing on the running page. GUIJam previews AI variants from Claude Code, Codex or another AI coding CLI live, and writes the one you keep to your components.

GUIJam works in React Router 7 or 8 apps in framework mode, the mode that runs on the React Router Vite plugin. Previews are live.

## Setup

Run `npx guijam@latest init`, or add the plugin yourself, before `reactRouter()`:

```ts title="vite.config.ts" {3,7}
import { reactRouter } from '@react-router/dev/vite';
import tailwindcss from '@tailwindcss/vite';
import { guijam } from 'guijam/vite';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [guijam(), tailwindcss(), reactRouter()],
});
```

GUIJam adds its client to your app's entry, so there's nothing to add to `root.tsx`.

> **Built with GUIJam**
>
> This documentation site is a React Router 8 app in framework mode, with `guijam()` first in its Vite config.

## Options

`guijam()` takes the same options as in any Vite app. See [Vite](https://guijam.francistinao.com/docs/frameworks/vite#options).
