Skip to content
Tech News
← Back to articles

MicroUI – A tiny, portable, immediate-mode UI library written in ANSI C

read original more articles
Why This Matters

MicroUI is a compact, portable immediate-mode UI library written in ANSI C that enables developers to create custom user interfaces with minimal memory overhead and broad rendering compatibility. Its simplicity and flexibility make it ideal for embedded systems, lightweight applications, or projects requiring custom control development. This development approach empowers the tech industry and consumers by facilitating efficient, customizable, and resource-conscious UI solutions.

Key Takeaways

A tiny, portable, immediate-mode UI library written in ANSI C

Features

Tiny: around 1100 sloc of ANSI C

of 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

... continue reading