Package Exports
- @opentui/solid
- @opentui/solid/jsx-dev-runtime
- @opentui/solid/jsx-runtime
- @opentui/solid/preload
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 "./node_modules/@opentui/solid/scripts/solid-plugin"
await Bun.build({
entrypoints: ["./index.tsx"],
target: "bun",
outdir: "./build",
plugins: [solidPlugin],
compile: {
target: "bun-darwin-arm64",
outfile: "app-macos",
},
})