The demos of Dear ImGui Bundle, by category, as in its demo launcher (the “Demo Apps” tab of demo_imgui_bundle, or python -m imgui_bundle.demos_python.demo_immapp_launcher). Most of them run in your browser, in the Python playground; some also exist in C++, in the interactive explorer.
In each card, ▶︎ Run opens the demo in your browser, and Code shows its source, on GitHub.
Dear ImGui Bundle¶
The bundle at a glance

Welcome to Dear ImGui Bundle¶
Interactive Python & C++ apps for desktop, mobile, and web - powered by Dear ImGui.
Start here¶
What Dear ImGui Bundle is, in two minutes

What is an Immediate GUI¶
With Dear ImGui, your GUI code is simple and direct: no widget trees, no callbacks, no state synchronization.
More
You call functions to create widgets, and they return the current value. That’s it.

A parametric curve¶
Turn the knobs, or click Random: the curve follows at once.
More
At every frame, the GUI function draws the plot with ImPlot and the knobs with imgui-knobs, and reads their values right there. No callbacks, no widget objects: that is the immediate mode.

Assets and add-ons¶
Load images and icons from your assets folder, and use two add-ons: markdown and ImPlot.
More
A markdown editor with a live preview, and a pie chart whose values you can drag. Tick More info under each part to see how it is done. The add-ons are activated with immapp.AddOnsParams.
Library tours¶
The libraries in the bundle: full demos and showcases

ImGui full demo¶
Every widget and feature of Dear ImGui, in Python.
More
The reference to learn Dear ImGui by example (a port of imgui_demo.cpp). Browse it next to its code in the Dear ImGui Explorer.

ImPlot full demo¶
Every kind of plot of ImPlot, in Python: lines, scatter, bars, heatmaps, histograms, real-time plots and more.
More
A port of implot_demo.cpp: browse it next to its code in the Dear ImGui Explorer.

ImPlot3D full demo¶
Rotatable, zoomable 3D plots in Python with ImPlot3D: lines, scatter, surfaces, meshes and more.
More
A port of implot3d_demo.cpp: browse it next to its code in the Dear ImGui Explorer.

ImPlot3D butterfly effect¶
Two trajectories of the Lorenz system start almost at the same point, and soon go completely different ways.
More
This is the butterfly effect, the signature of chaos theory. The plot uses ImPlot3D, which adds rotatable, zoomable 3D plots to Dear ImGui.

Themes and theme tweaking¶
Pick a complete look for your app, then fine-tune its colors, rounding and spacing.
More
The complete looks come from Hello ImGui.
Build an app¶
Layouts, docking, backgrounds, fonts, testing: what a real application needs

Dockable windows¶
Hello ImGui provides a docking system: define named dock spaces, then assign windows to them.
More
Windows can be dragged, tabbed, and rearranged by the user.

A full app: docking, fonts, logs¶
A template for a real application, built with Hello ImGui: copy it and start from there.
More
Dockable windows with several layouts, colored fonts and emojis, a log window, a status bar, toolbars, menus and a theme chooser. Your settings are saved, and restored at the next start. The code is heavily commented.

Custom 3D background (OpenGL)¶
Draw anything behind your GUI with OpenGL: here, an animated sea whose waves and colors you can tune.
More
The Seascape shader is by Alexander Alekseev (TDM, 2014). Hello ImGui calls runner_params.callbacks.custom_background at each frame, before the GUI: that is where it draws, with OpenGL (PyOpenGL in Python).
Desktop only

Power save when idle¶
When nothing happens, Hello ImGui lowers the frame rate to spare the CPU: watch the FPS and the spinner slow down.
More
Move the mouse, and they speed up again. The slider sets fps_idle (0 means full speed), and the checkbox turns idling off, for example during an animation.

Chinese and other non-Latin fonts¶
The bundled fonts cover Latin, Greek and Cyrillic only: other scripts show up as ???.
More
The fix: load a font that has the glyphs you need, first, so that it becomes the default font. This demo shows how, with Noto Sans SC: download it, and the demo’s sample lines come alive.
Desktop only

Command palette¶
A searchable list of commands, as in VS Code: press Ctrl+Shift+P (Cmd+Shift+P on macOS).
More
Type a few letters to filter it. One command changes the theme in two steps, another writes to the log below. Learn how to register commands and their callbacks with imgui

Test engine¶
Three windows: the Dear ImGui demo, the ImGui Test Engine panel, and a few buttons that run tests.
More
Watch a test drive the mouse and the keyboard: it opens tree nodes, clicks buttons, types text, and checks the results. See the test engine doc.
Desktop only

Drive an app, capture screenshots¶
A test function drives the app: it clicks, moves a slider, opens a header, and takes a screenshot at each step.
More
immapp.testing.run() starts the app, runs the test function, then exits. Handy for automated checks and for documentation pictures. See the test engine doc.
Desktop only
Lessons and explorables¶
Interactive scientific demos built with Dear ImGui Bundle, showcasing its capabilities

Interactive exploration of the Mandelbrot set¶
Click a point of the Mandelbrot set to see its Julia set.
More
Fly to famous values of c, and zoom into both pictures: near each point, the two sets look alike.

A tiny neural network learns two spirals¶
Can 16 neurons tell two spirals apart? Watch a tiny neural network learn, live, as in the TensorFlow Playground.
More
Then read how it works, formula by formula, next to its numpy code.

Simple harmonic motion¶
A mass on a spring, a pendulum, a vibrating string: they all follow the same equation.
More
It is the equation of simple harmonic motion (for the pendulum, at small angles). Adjust the mass and the spring stiffness, and watch how the motion changes.

Double pendulum¶
A double pendulum is a chaotic system: tiny changes in its initial conditions lead to wildly different trajectories.
More
Drag the angles to set initial positions, then release and watch chaos unfold.

Fourier epicycles¶
Any closed curve can be approximated by a sum of rotating circles (a Fourier series).
More
Adjust the number of circles to see how the approximation improves.

Logistic map¶
A very simple equation, and yet it can lead to wildly different behaviors, up to chaos.
More
The logistic map, x(n+1) = r * x(n) * (1 - x(n)), models for example the growth of a population with limited resources. Depending on r, it is stable, periodic (in 2-cycles, 4-cycles, etc), or chaotic. Let’s explore this.
Python specifics¶
Async, matplotlib, pydantic, context managers, and pure Python backends

Context managers (imgui_ctx)¶
In Python, with imgui_ctx.begin("Window"): replaces a begin() / end() pair, and the end() can no longer be forgotten.
More
The same exists for child windows, menus, popups, tables, tabs, fonts and styles, and for ImPlot with implot_ctx. Open a section to try it and read its code. See the Python tips.

Run code alongside the GUI (async)¶
The GUI runs as an asyncio task, while a Python loop keeps computing.
More
The window shows both rates: the GUI’s frames per second, and the loop’s computations per second. The loop yields with await asyncio.sleep(0) to share the event loop. See async support.
Desktop only
Python: Code

Control the GLFW window¶
glfw_utils.glfw_window_hello_imgui() returns the GLFW window that Hello ImGui created.
More
With it, any function of pyGLFW works on your app’s window. Here, buttons maximize, restore, minimize or center it, a slider sets its opacity, and another button makes it ask for attention in the taskbar.
Desktop only
Python: Code

Matplotlib figures¶
imgui_fig.fig() shows a Matplotlib figure as an image in the GUI.
More
On the left, an animated sine wave, redrawn at each frame, with a slider for its amplitude. On the right, a static figure, drawn once. Handy to reuse existing Matplotlib code; for fast interactive plots, prefer ImPlot.

Pydantic models¶
Save and load your app’s settings with Pydantic, ImVec2 and colors included.
More
ImVec2_Pydantic, ImVec4_Pydantic and ImColor_Pydantic are the usual ImVec2, ImVec4 and ImColor, usable as fields of a Pydantic model. The demo shows such a model, turns it into JSON, validates it back, and checks that nothing was lost.
Python backend: GLFW¶
Add ImGui to your own GLFW app: you write the app loop, and a Python backend does the rest.
More
The backend passes the inputs to ImGui and draws it with PyOpenGL. Shows the ImGui demo, and a window with markdown and a formula. Needs pip install imgui-bundle[glfw,opengl].
Desktop only
Python: Code
Python backend: SDL2¶
Add ImGui to your own SDL2 app: you write the event loop, and a Python backend does the rest.
More
It uses PySDL2; the backend passes the events to ImGui and draws it with PyOpenGL. Shows the ImGui demo, and a window with markdown and a formula. Needs pip install imgui-bundle[sdl2,opengl] pysdl2-dll.
Desktop only
Python: Code
Python backend: SDL3¶
Add ImGui to your own SDL3 app: you write the event loop, and a Python backend does the rest.
More
It uses PySDL3; the backend passes the events to ImGui and draws it with PyOpenGL. Shows the ImGui demo, and a window with markdown and a formula. Needs pip install imgui-bundle[sdl3,opengl].
Desktop only
Python: Code
Python backend: pyglet¶
Add ImGui to your own pyglet app or game: pyglet runs the loop, and a Python backend does the rest.
More
The backend passes pyglet’s events to ImGui and draws it with PyOpenGL. Shows the ImGui demo, and a window with markdown and a formula. Needs pip install imgui-bundle[pyglet,opengl].
Desktop only
Python: Code
Python backend: pygame¶
Add ImGui to your own pygame game: you write the game loop, and a Python backend does the rest.
More
The backend passes pygame’s events to ImGui and draws it with PyOpenGL. Shows a window with markdown, a formula and a few widgets. Needs pip install imgui-bundle[opengl] pygame.
Desktop only
Python: Code
Python backend: wgpu¶
ImGui drawn with WebGPU, by the ImGui renderer of wgpu-py, in a rendercanvas window.
More
wgpu-py uses Dear ImGui Bundle for its GUIs. Shows the ImGui demo, and a window with markdown and a formula. Needs pip install imgui-bundle[wgpu].
Desktop only
Python: Code
In the browser¶
Deploy to the web, and use the browser’s WebGL and WebAudio from Python

WebGL shader as background¶
The Mandelbrot set, drawn by a fragment shader behind the GUI.
More
Pyodide only: this demo calls the browser’s WebGL2 API directly, through Python’s js interop. On desktop, you would use PyOpenGL instead.
Browser only

WebAudio synthesizer¶
A small synthesizer written in Python: play the piano with the mouse or the computer keyboard, or let it play a tune.
More
Pick a waveform, add some echo, and watch the scope. Pyodide only: it plays through the browser’s WebAudio API, via Pyodide’s js interop.
Browser only
Haikus¶
Tiny programs, big effect

Butterfly effect, in a few lines¶
Two trajectories of the Lorenz system start almost at the same point, then drift apart: chaos in action.
More
Drawn in 3D with ImPlot3D. Sliders change the system’s parameters and the gap between the two starting points; Reset starts them over.









