tgui.js is a binding for the CTGUI library, designed to work with Deno. It provides a simple, intuitive and cross-platform API for building native GUIs.
The library allows you to create native GUI applications using Deno. The library wraps CTGUI, which is itself a C wrapper for TGUI, a cross-platform C++ GUI library.
- One command to compile to a native executable
- Cross-platform support (macOS, Windows)
- Simple, clean API for creating native GUI applications
You can import tgui.js directly from JSR:
import { Gui, Button /* ... */ } from "@denative/ctgui";
(The name of the library is @denative/ctgui
. It is different from the project because initial plans were to make just a wrapper for CTGUI, but later it was decided to make a full-fledged library with OO API.)
To set up the required binary for your project, run:
deno run --allow-net --allow-write https://jsr.io/@denative/ctgui/0.0.11/setup.ts
This will download the appropriate native library for your operating system and architecture.
This repository includes examples to help you get started with tgui.js.
To run the "various widgets" example which demonstrates different UI components:
-
Navigate to the examples directory:
cd examples/various-widgets
-
Install the binary (if not already installed):
deno task setup
-
Run the example:
deno task start
-
Alternatively, you can compile the example to a native executable:
deno task compile
-
This will create a native executable in the current directory. You can run it directly:
./various-widgets
- macOS (Intel and ARM)
- Windows
- Support for Linux is planned for future releases
This project is an experimental library. Contributers are always welcome! If you have suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
- Add event handling
- Improve the API
- Improve documentation and examples
- Add support for Linux
This project is licensed under the MIT License - see the LICENSE file for details.