GitPedia

Lua lwtk

Lua Widget Toolkit: implement cross platform GUI widgets in pure Lua on top of LPugl or LÖVE 2D game engine

From osch·Updated June 5, 2026·View on GitHub·

This toolkit provides a foundation for building cross platform GUI widgets in pure [Lua] on top of [LPugl] or within the [LÖVE] 2D game engine. For [LPugl] only the cairo drawing backend is supported. Further Backend abstraction and support for other backends could be possible in the future. The project is written primarily in Lua, distributed under the Other license, first published in 2020. Key topics include: cairo, gui, love2d, love2d-gui, love2d-gui-library.

lwtk - Lua Widget Toolkit

Licence
build status
Install

This toolkit provides a foundation for building cross platform GUI widgets in pure Lua
on top of LPugl or within the LÖVE 2D game engine. For LPugl only the cairo drawing backend
is supported. Further Backend abstraction and support for other backends could be possible in
the future.

This project is work in progress. First aim is to provide a basic infrastructure
for creating and customizing widgets. Second aim is to implement a reasonable set
of standard widgets. So far only very simple standard widgets are provided, e.g.
lwtk.TextInput and lwtk.PushButton.

<!-- ---------------------------------------------------------------------------------------- -->

Supported platforms:

  • Linux (X11)
  • Windows
  • Mac OS X
  • LÖVE 2D game engine
<!-- ---------------------------------------------------------------------------------------- -->

Further reading:

<!-- ---------------------------------------------------------------------------------------- -->

First Example

  • The first example demonstrates a simple "Hello World" dialog.
    The appearance of the widgets is configured in lwtk.DefaultStyle.
    The key bindings are configured in lwtk.DefaultKeyBinding.

    Screenshot example01

    lua
    local lwtk = require("lwtk") local Application = lwtk.Application local Column = lwtk.Column local Row = lwtk.Row local PushButton = lwtk.PushButton local TitleText = lwtk.TitleText local Space = lwtk.Space local app = Application("example") local function quit() app:close() end local win = app:newWindow { title = "example", Column { TitleText { text = "Hello World!", style = { textSize = 35 } }, Row { Space {}, PushButton { text = "&OK", onClicked = quit }, Space {} } }, } win:show() app:runEventLoop()
<!-- ---------------------------------------------------------------------------------------- --> <!-- ---------------------------------------------------------------------------------------- -->

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from osch/lua-lwtk via the GitHub API.Last fetched: 6/13/2026