PackagesSolid

@opentui/solid

Solid.js support for OpenTUI.

Installation

bun install solid-js @opentui/solid

Usage

  1. Add jsx config to tsconfig.json:

{
  "compilerOptions": {
    "jsx": "preserve",
    "jsxImportSource": "@opentui/solid"
  }
}
  1. Add preload script to bunfig.toml:

preload = ["@opentui/solid/preload"]
  1. Add render function to index.tsx:

import { render } from "@opentui/solid"

render(() => <text>Hello, World!</text>)
  1. Run with bun index.tsx.

How is this guide?

Last updated on

Powered by Holocron

Documentation

On this page