Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

microui

> 编程语言
Open source

A tiny immediate-mode UI library

6.7K stars0 likes1 views
WebsiteGitHub

About

A tiny immediate-mode UI library

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

Features

  • Tiny: around 1100 sloc 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

c
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

Browser Demo

Usage

  • See doc/usage.md for usage instructions
  • See the demo directory 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.

Issues· 36 open

View all issuesOpen on GitHub
  • #79

    Creating a community-maintained fork of microui

    Updated Aug 24, 2026
  • #20

    Mouse down event not registered properly when there is no mouse motion

    Updated Jun 9, 2026
  • #35

    Post a screenshot

    Updated May 27, 2026
  • #71

    Question: How should High DPI displays be handled?

    Updated Oct 20, 2025
  • #80

    mu_Command invokes undefined behavior.

    Updated Oct 13, 2025
  • #74

    Unexpected Callback Invocation

    Updated Jun 28, 2025
  • #22

    Feel free to join Immediate Mode UI organization

    Updated Jun 26, 2025
  • #72

    NOT A BUG: HOWTO - SDL3 and Textbox

    Updated May 23, 2025
  • #70

    MU_OPT_NOCLOSE and others gives no result

    Updated Apr 27, 2025
  • #69

    NOT A BUG: Is it possible to make UI elements outside an 'mu_window'?

    Updated Nov 21, 2024

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 23, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言