~25–35% fewer tokens than JSX

React UI that
speaks fluent token.

A compact, indentation-based template syntax for React. Same components, far fewer tokens — built for the era where AI reads and writes your UI.

Get started$ pnpm add opjsx
0
JSX tokens
0
opjsx tokens
−31%

HOW IT WORKS

Same UI. Fewer tokens.

Every token an LLM reads or writes costs money and context. opjsx drops closing tags, angle brackets, and {} wrappers — so the model processes the same component in a fraction of the tokens.

JSXfull page: 0 tokens
<divclassName="card"><h1>Hello{name}</h1><buttononClick={onHi}>Sayhi</button></div>
19 chips
tokenize ↓
opjsxfull page: 0 tokens
&div.card&h1Hello${name}&buttononClick"${onHi}"Sayhi
10 chips

Fit ~31% more UI per request

The leaner the markup, the more of your interface fits in a single context window — cheaper generations, fewer truncations, faster responses.

JSX876 tok
opjsx604 tok
01

Write

Author your tree with &tag.class, attr"value", and indentation — no closing tags.

02

Parse

opjsx turns the template into a plain JSON element tree, preserving ${…}.

03

Render

The tree becomes React.createElement calls. Real React, zero build step.

WHY IT MATTERS FOR AI

Tokens are the budget.

0%

Lower token cost

Fewer tokens in and out means cheaper generations on every render.

0%

More context

Fit more of your UI in one window — fewer truncations and retries.

0%

Same React

Identical semantics — it compiles to standard React.createElement.

Works wherever React runs

React
Next.js
Vite
TypeScript
Remix
Astro
React Native
Gatsby
React
Next.js
Vite
TypeScript
Remix
Astro
React Native
Gatsby

Ship UI in fewer tokens.

One import, no build step. Add opjsx and return a template.