πŸ¦– KAPLAY-UI 🧩

A lightweight and flexible UI plugin for KAPLAY, built to feel like a natural extension of the engine.

Create UI elements quickly using familiar KAPLAY primitives β€” buttons, labels, HUD elements, menus, and more.

✨ KAPLAY UI helps you build game-ready user interfaces with almost no setup. Perfect for menus, HUDs, mobile UI, prototypes, and small-to-medium games.

πŸš€ Why KAPLAY-UI?


πŸ“¦ Installation (v1.0.0-alpha*)

npm install kaplay-ui@next

🧰 Getting Started

Add the plugin when creating your KAPLAY instance:

import kaplay from "kaplay";
import kaplayUI from "kaplay-ui";

const k = kaplay({
  plugins: [kaplayUI],
});

Now create a UI element:

const tb = k.addTextButton("Play");
const sl = k.addLabel("Score: 0");

That’s it β€” you’re ready to build UI!


🧱 Core Components

πŸ”€ Text Button

Create an interactive button with centered text and built‑in outline & area detection.

const tb = k.addTextButton("Play");

tb.onClick(() => k.go("game"));

🏷️ Label

A small, flexible text element β€” perfect for HUDs.

const lbl = k.addLabel("Score: 0");

lbl.setLabelText("Score: 1");

More components are being added soon as the plugin grows. πŸŽ‰


πŸ“š Documentation

You can find more details here:

And soon also:


πŸ—ΊοΈ Roadmap (WIP)


🀝 Contributing

Contributions and feature ideas are warmly welcome!

Feel free to submit issues or PRs on GitHub β€” or share ideas in the discussions tab.


πŸ“œ License

MIT Β© 2026 Jonas Bak Phillipson


Made with πŸ’š + πŸ¦– by:

The KAPLAY Community