Add a debug panel or settings UI to a C game or graphics app without pulling in a large GUI library.
Build tool UIs with buttons, sliders, and checkboxes that render through your existing graphics backend.
Embed a lightweight UI layer in a project with strict memory constraints, microui never allocates memory at runtime.
Port a UI to a new platform by implementing only the drawing commands microui outputs, without changing UI logic.
You must implement your own renderer, microui outputs draw commands but does not draw anything itself.
microui is a very small library for building user interfaces in C. The entire codebase is around 1,100 lines of code, which is unusually compact for a UI toolkit. It is written in standard C, meaning it can be compiled and run on almost any platform without modification. The library follows an approach called immediate-mode UI. Rather than creating persistent objects for each button or panel that live in memory and need to be managed, immediate-mode UI redraws the interface from scratch every frame by calling functions in sequence. Each call both defines what a widget looks like and checks whether the user interacted with it. The code example in the README shows this clearly: a window, two labels, two buttons, and a popup are all described by a handful of function calls inside a loop. The built-in controls include windows, scrollable panels, buttons, sliders, text boxes, labels, checkboxes, and word-wrapped text. The library handles layout automatically and lets developers add custom controls if needed. One design constraint worth noting is that microui does not draw anything itself. It produces a list of drawing commands, and the developer is responsible for feeding those commands to whatever graphics system the application already uses. This makes it compatible with any rendering setup that can draw rectangles and text. Memory usage is fixed at startup, meaning the library never allocates additional memory at runtime. The project is open source under the MIT license.
← rxi on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.