# @orz/ui

A UI library by AI, for AI: React components, a theme store and guidelines for tools people live in all day, on a desktop with a mouse and on a phone with a thumb.

# Components for tools people live in all day.

A UI library by AI, for AI: React and Tailwind CSS v4 components, a theme store, and viewers for what tools produce.

## Dense with a mouse, generous with a thumb.

On a touchscreen every control keeps its look and takes the room a finger needs by itself: rows grow and targets move apart. An app writes one layout for both.

## The theme is the user's.

Every surface, viewer and diagram follows the palette and the style its user picked; nothing in an app hard-codes a colour.

## Viewers for what tools produce.

ANSI logs, diffs, terminal recordings, hex, JSON, mail and markdown each have a package of their own, so an app pays only for the viewers it imports.

## By AI, for AI

**By AI.** Coding agents write every package here, and a person decides what ships.

**For AI.** Agents build apps on it from its components as they are, and each guideline is written to be followed as written.

**For people.** Those apps are tools someone keeps open all day, and every component answers to them.

## Packages

Every package shares one version and is published under the `@orz` scope on npm. `@orz/ui` is the core; the heavier pieces are packages of their own, so an app pays only for what it imports.

| Package              | What it is                                                            |
| -------------------- | --------------------------------------------------------------------- |
| `@orz/ui`            | React primitives, patterns, hooks and the theme store                 |
| `@orz/query`         | The grammar of a search box and a slash-command line                  |
| `@orz/themes`        | Theme palettes for the UI and for terminals, as plain data            |
| `@orz/ui-ansi`       | Text with ANSI escapes, and logs by level                             |
| `@orz/ui-asciinema`  | Terminal recordings played in the page                                |
| `@orz/ui-code`       | Highlighted code, diffs and a word differ                             |
| `@orz/ui-codemirror` | CodeMirror 6 editors: prose, markdown, completion                     |
| `@orz/ui-content`    | The registry through which content packages draw one another          |
| `@orz/ui-hex`        | A hex view, editor and data inspector                                 |
| `@orz/ui-json`       | A JSON tree viewer: JSON, JSONC, JSON5, YAML and TOML, comments shown |
| `@orz/ui-mail`       | Mail messages (.eml): headers, body and attachments                   |
| `@orz/ui-markdown`   | GitHub-style markdown                                                 |
| `@orz/ui-mermaid`    | Mermaid diagrams in the active theme                                  |

## For agents

1. [llms.txt](/ui/llms.txt) Every page as Markdown, indexed: read this before the HTML.
2. [Skill](/ui/skills/orz-ui/SKILL.md) Teaches an agent to build with @orz/ui. Install it: `curl -fsSL --create-dirs -o .claude/skills/orz-ui/SKILL.md https://orzfly.github.io/ui/skills/orz-ui/SKILL.md`
3. [Start](/ui/start/index.md) Install @orz/ui, load its stylesheet, create a theme store, and render a first component.
4. [Principles](/ui/guidelines/principles/index.md) The rules the rest of the guidelines follow from. When a page is silent, these decide.
5. [Guidelines](/ui/guidelines/index.md) Principles, foundations, desktop and touch, and which component to reach for.
6. [Storybook](/ui/storybook/) Every export, live, with its props: the Storybook reference.
7. [Demos](/ui/demos/index.md) Whole screens built only from @orz packages and sample data. Resize them, or open them on a phone.
