# Visual AI UI editing for SvelteKit

> Visually edit a SvelteKit app with AI. Add guijam() before sveltekit() in vite.config for live UI variants and edits mapped to your .svelte files.

Edit the UI of your SvelteKit 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 `.svelte` files.

GUIJam runs inside SvelteKit's Vite dev server. Previews are live, and regular elements in your `.svelte` files map to source.

## Setup

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

```ts title="vite.config.ts" {3,7}
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { guijam } from 'guijam/vite';
import { defineConfig } from 'vite';

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

GUIJam injects its client into SvelteKit's browser entry, so there's nothing to add to your layouts.

## What maps to source

GUIJam marks regular elements with Svelte's own compiler. Components aren't marked, so select the elements inside them instead.

## Options

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