Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

What is Dear ImGui Bundle?

Dear ImGui Bundle is a “batteries included” framework built on Dear ImGui. It bundles 20+ libraries for plotting, markdown, node editors, 3D gizmos, and more - all working seamlessly in C++ and Python, on all major platforms (Windows, Linux, macOS, iOS, Android, WebAssembly).

If you are building scientific tools, game tools, visualization applications, developer tools, or creative apps, give it a try. You’ll soon see that GUI code can be clear, readable, and easy to maintain. The immediate mode paradigm makes it a joy to reason about your app logic.

Key highlights:


Code That Reads Like a Book

The immediate mode paradigm means your UI code is simple and direct: the app below can be coded with just 9 readable lines of Python:

from imgui_bundle import imgui, hello_imgui

selected_idx = 0
items = ["Apple", "Banana", "Cherry"]

def gui():
    global selected_idx
    imgui.text("Choose a fruit:")
    _, selected_idx = imgui.list_box("##fruits", selected_idx, items)
    imgui.text(f"You selected: {items[selected_idx]}")

hello_imgui.run(gui, window_title="Fruit Picker")
Fruit picker app

The relation between code and behavior is direct: what you write is what runs. There are no hidden widget trees, no callback chains, and no implicit state synchronization. This makes it easier to reason about your app’s logic and flow.

Easy to understand for humans

Being able to work with readable code is getting more and more important as LLMs are now widely used to generate code: You, the human, still need to understand, review, and maintain that code. Immediate mode makes this easier.

Easy to understand for AI

And the same clarity that helps humans also helps AI: with no implicit state to get wrong, LLMs can read and generate ImGui code reliably. The full PDF manuals give an AI assistant all the context it needs.


How Does It Compare?

Not sure if Dear ImGui Bundle is right for you? Compare the code styles with other popular GUI libraries:

ImGui Bundle
Qt
DearPyGui
NiceGUI
Gradio

12 lines – True immediate mode: UI declaration is the event handler

from imgui_bundle import imgui, hello_imgui

selected_idx = 0
items = ["Apple", "Banana", "Cherry"]

def gui():
    global selected_idx
    imgui.text("Choose a fruit:")
    _changed, selected_idx = imgui.list_box("##fruits", selected_idx, items)
    imgui.text(f"You selected: {items[selected_idx]}")

hello_imgui.run(gui, window_title="Fruit Picker")

Strengths: Simplest code, real-time capable, runs on desktop + web (Pyodide), 20+ integrated libraries, full C++ support

Best for: Tools, visualization, games, scientific apps


Who is it for?

Who is this project not for

You should prefer a more complete framework (such as Qt for example) if your intent is to build a fully fledged application, with support for accessibility, internationalization, advanced styling, etc.


Learn More