MicroUI – A tiny, portable, immediate-mode UI library written in ANSI C
Summary
MicroUI is a minimal, portable immediate-mode UI library written in ANSI C, providing basic controls like windows, buttons, sliders, and textboxes within a fixed memory footprint.
View Cached Full Text
Cached at: 06/17/26, 02:41 PM
rxi/microui
Source: https://github.com/rxi/microui
A tiny, portable, immediate-mode UI library written in ANSI C
Features
- Tiny: around
1100 slocof ANSI C - Works within a fixed-sized memory region: no additional memory is allocated
- Built-in controls: window, scrollable panel, button, slider, textbox, label, checkbox, wordwrapped text
- Works with any rendering system that can draw rectangles and text
- Designed to allow the user to easily add custom controls
- Simple layout system
Example

if (mu_begin_window(ctx, "My Window", mu_rect(10, 10, 140, 86))) {
mu_layout_row(ctx, 2, (int[]) { 60, -1 }, 0);
mu_label(ctx, "First:");
if (mu_button(ctx, "Button1")) {
printf("Button1 pressed\n");
}
mu_label(ctx, "Second:");
if (mu_button(ctx, "Button2")) {
mu_open_popup(ctx, "My Popup");
}
if (mu_begin_popup(ctx, "My Popup")) {
mu_label(ctx, "Hello world!");
mu_end_popup(ctx);
}
mu_end_window(ctx);
}
Screenshot

Usage
- See
doc/usage.mdfor usage instructions - See the
demodirectory for a usage example
Notes
The library expects the user to provide input and handle the resultant drawing commands, it does not do any drawing itself.
Contributing
The library is designed to be lightweight, providing a foundation to which you can easily add custom controls and UI elements; pull requests adding additional features will likely not be merged. Bug reports are welcome.
License
This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.
Similar Articles
ocornut/imgui
Dear ImGui is a bloat-free C++ GUI library optimized for fast iteration and creating debug/tool UIs, widely used in game engines and real-time 3D applications.
Movwin: My (Unpublished) TUI Framework
A blog post detailing the author's personal, unpublished TUI framework 'movwin' built on ncurses in Python, focusing on Unicode support and performance, with the decision to keep it private due to concerns about AI companies scraping code.
UI-Mate: Advancing Open-Weight Foundation GUI Agents with In-Context Demonstrations
UI-Mate is a foundation GUI agent that uses environment-grounded training and in-context demonstrations to improve reliability on long-horizon office tasks, achieving state-of-the-art results on computer-use benchmarks.
Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
Adi2 is a modern GUI library for Ada that provides CSS styling, XML-based UI layouts, and rich content rendering on SDL3, with WebAssembly support and tooling features.
@TheTechDiggest: [OpenSource - Web UI Elements & Design] Designing custom buttons, loaders, and cards from scratch eats up valuable deve…
UIverse is an open-source collection of community-made web UI elements, helping developers speed up frontend workflows with thousands of custom components.
