@opentui/solid
v0.1.72
Published
SolidJS renderer for OpenTUI
Readme
@opentui/solid
Solid.js support for OpenTUI.
Installation
bun install solid-js @opentui/solidUsage
- Add jsx config to tsconfig.json:
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "@opentui/solid"
}
}- Add preload script to bunfig.toml:
preload = ["@opentui/solid/preload"]- Add render function to index.tsx:
import { render } from "@opentui/solid"
render(() => <text>Hello, World!</text>)import solidPlugin from "@opentui/solid/bun-plugin"
await Bun.build({
entrypoints: ["./index.tsx"],
target: "bun",
outdir: "./build",
plugins: [solidPlugin],
compile: {
target: "bun-darwin-arm64",
outfile: "app-macos",
},
})