opjsx
v0.1.1
Published
Author React UI in a compact, token-efficient template syntax. opjsx`&div.card ...` → React.
Maintainers
Readme
opjsx
Author React UI in a compact, token-efficient template syntax — then render it.
import { opjsx } from "opjsx";
function Hello({ name }: { name: string }) {
return opjsx`
&div.greeting
&h1
Hello ${name}
&button onClick"${() => alert("hi")}"
Say hi
`;
}&tag.class for elements, attr"value" for props, indentation for nesting,
${…} for dynamic values, handlers, and .map(). ~25–35% fewer tokens than the
equivalent JSX.
Install
pnpm add opjsx reactDocumentation
Full syntax, API, token-efficiency notes, and the copy-and-install Claude skill:
📖 https://zahinafsar.github.io/opjsx
License
MIT
