explaingit

immediate-mode-ui/nuklear

11,123CAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Nuklear is a single-file C library for building immediate-mode GUIs with no dependencies, designed to plug into any rendering backend on any platform.

Mindmap

mindmap
  root((nuklear))
    What it does
      Immediate-mode GUI
      Per-frame layout
      No persistent widget state
    Design
      Single header file
      No dependencies
      C89 compatible
    Widgets
      Windows and panels
      Buttons and sliders
      Text input
    Integration
      OpenGL backend
      SDL backend
      Custom renderer
    Language bindings
      Python Rust Go
      Java Lua C#
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a debug overlay with buttons and sliders to a game or graphics application in C

USE CASE 2

Build a lightweight settings panel inside a C or C++ tool without pulling in a large GUI framework

USE CASE 3

Embed a GUI in an embedded system or constrained environment where dependencies are a problem

USE CASE 4

Use Nuklear bindings for Python, Rust, or Go to add a UI without writing C directly

Tech stack

CC89

Getting it running

Difficulty · moderate Time to first run · 30min

Requires wiring to a rendering backend such as OpenGL or SDL, Nuklear has no built-in display output.

Use freely for any purpose including commercial projects with no restrictions, available under MIT or public domain.

In plain English

Nuklear is a library for building graphical user interfaces in C applications. It gives you the building blocks for windows, buttons, sliders, text inputs, and other on-screen controls, which you can then connect to any graphics or rendering system of your choice. It does not assume anything about how you display things on screen or how your operating system handles input, so it works across a wide range of platforms and contexts. The library follows an approach called immediate-mode GUI, which means the interface is described and drawn fresh each frame in code rather than being set up as a persistent tree of objects. In practice this makes the code straightforward to read: you describe what should appear on screen in the same place where you handle the logic, without maintaining separate state for every widget. A notable design choice is that the entire library ships as a single C header file with no external dependencies. Adding it to a project means copying one file. You can also exclude parts you do not need, which keeps the compiled size small. The codebase is written in C89, the oldest widely-supported version of C, so it compiles on old compilers and embedded toolchains without modification. Memory usage is fully under the developer's control, and the library does not hold any hidden global state. Community contributors have created bindings for other programming languages including Python, Rust, Go, Java, Lua, D, and C#. These allow developers in those languages to use Nuklear without writing C directly. The project is available under either the MIT license or the public domain, giving developers broad freedom in how they incorporate it. It was inspired by the imgui library and credits several other open-source single-header libraries as influences.

Copy-paste prompts

Prompt 1
Show me how to create a Nuklear window with a button, slider, and text label in C using an OpenGL backend
Prompt 2
How do I integrate Nuklear into an SDL2 application to handle input and rendering?
Prompt 3
How do I use the Nuklear Python bindings to build a simple settings panel?
Prompt 4
How do I handle text input fields in Nuklear and read the string the user typed?
Prompt 5
Show me how to customize Nuklear's color scheme and fonts to match my app's visual style
Open on GitHub → Explain another repo

← immediate-mode-ui on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.