---
title: "Packages"
description: "Every @gistui package, what it is for, and which ones you need."
---

> Documentation Index
> Fetch the complete documentation index at: https://gistui.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Packages

GistUI is one project in twelve packages, released together under one version. Install and upgrade them together.

## Which ones you need

| You are building | Install |
|---|---|
| A React app | `@gistui/react` `@gistui/styles` `@gistui/catalog` |
| A Vue, Svelte or Solid app | `@gistui/vue` (or `svelte`, `solid`) `@gistui/styles` `@gistui/catalog` |
| Anything else in a browser | `@gistui/vanilla` `@gistui/styles` `@gistui/catalog` |
| A server route without an AI SDK | add `@gistui/server` |
| A chat | add `@gistui/chat` |
| A parser, validator or tool of your own | `@gistui/core` |

## All packages

| Package | What it is |
|---|---|
| [`@gistui/react`](https://www.npmjs.com/package/@gistui/react) | React renderer and default components. `@gistui/react/ui` is the default library; `@gistui/react/prompt` re-exports `prompt`. |
| [`@gistui/vue`](https://www.npmjs.com/package/@gistui/vue) | Vue 3.5+ and Nuxt |
| [`@gistui/svelte`](https://www.npmjs.com/package/@gistui/svelte) | Svelte 5 and SvelteKit. Ships Svelte source. |
| [`@gistui/solid`](https://www.npmjs.com/package/@gistui/solid) | Solid and SolidStart |
| [`@gistui/vanilla`](https://www.npmjs.com/package/@gistui/vanilla) | Framework-free renderer; the base of Vue, Svelte and Solid |
| [`@gistui/catalog`](https://www.npmjs.com/package/@gistui/catalog) | The 63 component schemas, the design guide, the system prompt and the agent skill. Renderers import `@gistui/catalog/render`, which leaves the prompt text out of the browser bundle. |
| [`@gistui/styles`](https://www.npmjs.com/package/@gistui/styles) | One stylesheet for every renderer, in `@layer gistui` |
| [`@gistui/server`](https://www.npmjs.com/package/@gistui/server) | `textDeltas`, `toReadable`, `validateProgram`, `repairProgram`, `repairStream`. Runs on Node, Bun, Deno, Edge and Workers. |
| [`@gistui/chat`](https://www.npmjs.com/package/@gistui/chat) | Headless chat store, model adapters, thread storage. `@gistui/chat/react` has the layouts. |
| [`@gistui/core`](https://www.npmjs.com/package/@gistui/core) | The language: streaming parser, materializer, validator, autofix, printer, edit merge, prompt generator. No dependencies. |
| [`@gistui/headless`](https://www.npmjs.com/package/@gistui/headless) | Shared internals: the engine, themes, forms |
| [`@gistui/widgets`](https://www.npmjs.com/package/@gistui/widgets) | Shared internals: charts, Markdown |

## `@gistui/core` in brief

```ts
import { autofix, createStream, merge, parse, toEditSource, validate } from "@gistui/core";
```

| Function | Does |
|---|---|
| `parse(source, lib)` | One-shot parse: `{ root, store, errors, valid: { strict, lenient } }` |
| `createStream(lib)` | An incremental stream: `push(chunk)`, `flush()`, `end()`, `errors()`, and a `store` to subscribe to |
| `validate(source, lib)` | Validity, errors and the reachable component count |
| `autofix(source, lib)` | Deterministic repair, with every change listed |
| `toEditSource(source, lib)` | The canonical printout for an edit turn |
| `merge(base, edit, lib)` | Applies an edit: `{ source, errors }` |
| `createEditStream(base, lib)` | A stream seeded with a program, so an edit renders live |
| `generatePrompt(lib, options)` | A byte-stable system prompt |
| `defineLibrary({ components })` | A library from component specs |

```ts
const stream = createStream(lib);
stream.store.subscribe("root", () => render(stream.store.get("root")));
for await (const chunk of modelText) {
  stream.push(chunk); // text or UTF-8 bytes
  stream.flush();     // once per frame: commits patches and notifies subscribers
}
stream.end();
```

## Sizes

Measured gzip, React excluded.

| | Size |
|---|---:|
| Runtime (engine and React renderer) | 32 KB |
| Default components, first load | 74 KB |
| Stylesheet | 29 KB |

Charts, tables, slides, pickers, code, math and diagrams load on demand.

## Source and releases

- Repository: [github.com/GistUI/GistUI](https://github.com/GistUI/GistUI) (MIT)
- [Changelog](https://github.com/GistUI/GistUI/blob/main/CHANGELOG.md)
- Packages are published to npm with provenance.

Source: https://gistui.com/docs/reference/packages/index.mdx
