Immediate-Mode-UI/Nuklear logo

Immediate-Mode-UI/Nuklear

Free

A single-header ANSI C immediate mode cross-platform GUI library

FreeFree tier
Type
Open Source

About Immediate-Mode-UI/Nuklear

Nuklear is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It is designed as a simple embeddable UI for applications, with no dependencies, no default render backend, and no OS window/input handling. Instead, it provides a modular, library-based approach with simple input state and draw commands describing primitive shapes as output. The library is a single-header, written in C89 (ANSI C), with a small codebase (~18kLOC) focusing on portability, efficiency, and simplicity. It is fully skinnable, customizable, supports UTF-8, has low memory footprint with total control of memory usage, and offers optional font baker and vertex buffer output. There is no global or hidden state, and library modules can be customized to compile only what is needed.

Key Features

Immediate-mode graphical user interface toolkit
Single-header library (nuklear.h)
Written in C89 (ANSI C)
Small codebase (~18kLOC)
No dependencies (not even the standard library if not wanted)
Fully skinnable and customizable
Low memory footprint with total control of memory usage
UTF-8 support
No global or hidden state
Customizable library modules (compile only what you need)

Pros & Cons

Pros
  • No external dependencies (not even standard library)
  • Highly portable across platforms and compilers
  • Free and open source (public domain)
  • Small memory footprint with explicit control
  • Fully customizable look and feel
  • Supports UTF-8 text rendering
  • Self-contained single-header file simplifies integration
Cons
  • No built-in render backend or window/input handling (requires manual integration)
  • Immediate-mode paradigm may be less intuitive for developers used to retained-mode UIs
  • Limited built-in widget set (user must implement complex layouts)
  • Not ideal for highly complex or data-driven UIs due to immediate-mode overhead

Best For

Embedded GUI in C/C++ applicationsLightweight UI overlays for games or toolsCross-platform user interface developmentPrototyping and simple UI components

FAQ

Does Nuklear have any dependencies?
No, Nuklear has no dependencies at all. It does not even require the standard library if not desired.
How do I integrate Nuklear into my project?
Include the single header file 'nuklear.h' in your project. Define the macro NK_IMPLEMENTATION in exactly one .c or .cpp file before including it to generate the implementation.
Does Nuklear provide rendering or window handling?
No, Nuklear only produces draw commands (primitive shapes). You must provide your own render backend and OS window/input handling.
What license does Nuklear use?
Nuklear is released into the public domain. It is free to use for any purpose without restrictions.