Animation Engine for Dear ImGui
See the codeAnimation Engine for Dear ImGui
ImAnim brings modern animation capabilities to ImGui applications. Write smooth UI animations with minimal code.
This is the first stable release of ImAnim, featuring a complete animation toolkit for Dear ImGui.
// Animate anything in one line
float alpha = iam_tween_float(id, channel, hovered ? 1.0f : 0.5f, 0.3f, ease, policy, dt);
| Category | Capabilities |
|---|---|
| Tweens | Float, Vec2, Vec4, Int, Color with crossfade/cut/queue policies |
| Clips | Timeline keyframes, looping, callbacks, chaining, stagger, variations |
| Easing | Quad to Bounce presets, cubic-bezier, steps, spring physics, per-axis |
| Paths | Bezier curves, Catmull-Rom splines, path morphing, text along paths |
| Transforms | Position, rotation, scale with rotation modes |
| Procedural | Oscillators, shake, wiggle, Perlin/Simplex noise |
| Colors | Gradients, style interpolation, OKLAB/OKLCH blending |
| Advanced | Layering/blending, resolved tweens, drag feedback, scroll animation |
| Tools | Debug inspector, profiler, save/load, memory management |
Step 1: Copy im_anim.h and im_anim.cpp to your project.
Step 2: Add two lines after ImGui::NewFrame():
ImGui::NewFrame();
// Add these two lines
iam_update_begin_frame();
iam_clip_update(ImGui::GetIO().DeltaTime);
// Your UI code...
Step 3: Animate! Here's a hover effect:
bool hovered = ImGui::IsItemHovered();
float scale = iam_tween_float(
ImGui::GetID("btn"), ImHashStr("scale"),
hovered ? 1.1f : 1.0f, 0.2f,
iam_ease_preset(iam_ease_out_back),
iam_policy_crossfade,
ImGui::GetIO().DeltaTime
);
That's it. No build system changes, no external dependencies.
Timeline for clips with tooltip helpers:
Support for delayed start:
Open examples/ImAnim_vs2022_Win64.sln in Visual Studio 2022 and select a configuration:
| Configuration | Backend |
|---|---|
Release_Win32_DX11 | Win32 + DirectX11 |
Release_GLFW_OpenGL3 | GLFW + OpenGL3 |
Release_SDL2_OpenGL3 | SDL2 + OpenGL3 |
Release_ImPlatform | ImPlatform abstraction |
Debug configurations are also available for each backend.
Each backend has its own Makefile:
cd examples/glfw_opengl3
make
# or
cd examples/sdl2_opengl3
make
The CMake build compiles the demo against every backend permutation ImPlatform supports, and is what CI runs. It builds ImPlatform from the submodule, so no system Dear ImGui is needed.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target ImAnimDemo_GLFW_Vulkan --parallel
Binaries land in build/bin/. Configurations whose dependencies are missing are
skipped at configure time with a message, so a partial toolchain still builds
whatever it can.
| Configuration | Windows | Linux | macOS |
|---|---|---|---|
Win32_DX11 | yes | - | - |
Win32_DX12 | yes | - | - |
SDL3_DX11 | yes | - | - |
GLFW_Vulkan | yes | yes | yes |
SDL3_Vulkan | yes | yes | yes |
GLFW_Metal | - | - | yes |
SDL3_Metal | - | - | yes |
Win32_OpenGL3 | yes | - | - |
GLFW_OpenGL3 | - | yes | yes |
SDL3_OpenGL3 | - | yes | - |
GLFW is deliberately absent from the DirectX rows: it exposes no native window
handle, so the DirectX backends cannot obtain an HWND from it. Vulkan on macOS
runs through MoltenVK. The Metal configurations currently compile but do not
run, because ImPlatform_InitGfxAPI in ImPlatform's Metal backend still returns
false pending an NSWindow accessor on the GLFW and SDL3 backends.
Comprehensive guides for every ImAnim feature, organized by category. Each doc includes code examples and API references.
The im_anim_demo.cpp file provides a comprehensive playground for exploring all ImAnim features. Call ImAnimDemoWindow() to display it.
| Category | What You'll Find |
|---|---|
| Easing & Tweens | Easing gallery, custom bezier editor, spring physics, per-axis easing |
| Interactive Widgets | Animated buttons, toggle switches, hover cards, progress indicators |
| Clip-Based Animations | Timeline keyframes, looping, callbacks, chaining, layering system |
| Procedural Animations | Oscillators, shake/wiggle effects, Perlin/Simplex noise |
| Motion Paths | Bezier curves, Catmull-Rom splines, path morphing, text along paths |
| Advanced Interpolation | Gradients, transforms, style interpolation, text stagger |
| Utilities | ImDrawList animations, resize-aware helpers, scroll animation, drag feedback |
| Debug Tools | Inspector, profiler, memory stats |
| Stress Test | Performance benchmarks with thousands of concurrent animations |
The demo showcases practical UI patterns you can adapt:
| Animated Tag |
|---|
| Ripple Button |
|---|
| "Wait" Button |
|---|
| Data Visualization |
|---|
Visual examples of ImAnim capabilities in action.
| List Stagger | Grid Stagger | Card Stagger |
|---|---|---|
| Easing Gallery | Custom Bezier | Wave Animations |
|---|---|---|
| Color Blending | Gradient | Transforms |
|---|---|---|
| Motion Path | Text Effects | Variations |
|---|---|---|
| Noise | ImGui Widgets | ImDrawList |
|---|---|---|
| Oscillator Waves | Transform Layers |
|---|---|
Development is supported through Patreon:
The Visual Studio solution is generated using Sharpmake. To regenerate projects after modifying the build configuration:
Prerequisites: .NET 6.0 SDK or later
# First time setup (builds Sharpmake)
cd examples
bootstrap.bat # Windows
./bootstrap.sh # Linux/macOS
# Regenerate projects
generate_projects.bat # Windows
./generate_projects.sh # Linux/macOS
MIT License - see LICENSE for details.
Made for the Dear ImGui community
420 followers · starred Dec 2025
373 followers · starred Dec 2025
529 followers · starred Dec 2025
3,149 followers · starred Dec 2025
Animation Engine for Dear ImGui
See the codeAnimation Engine for Dear ImGui
ImAnim brings modern animation capabilities to ImGui applications. Write smooth UI animations with minimal code.
This is the first stable release of ImAnim, featuring a complete animation toolkit for Dear ImGui.
// Animate anything in one line
float alpha = iam_tween_float(id, channel, hovered ? 1.0f : 0.5f, 0.3f, ease, policy, dt);
| Category | Capabilities |
|---|---|
| Tweens | Float, Vec2, Vec4, Int, Color with crossfade/cut/queue policies |
| Clips | Timeline keyframes, looping, callbacks, chaining, stagger, variations |
| Easing | Quad to Bounce presets, cubic-bezier, steps, spring physics, per-axis |
| Paths | Bezier curves, Catmull-Rom splines, path morphing, text along paths |
| Transforms | Position, rotation, scale with rotation modes |
| Procedural | Oscillators, shake, wiggle, Perlin/Simplex noise |
| Colors | Gradients, style interpolation, OKLAB/OKLCH blending |
| Advanced | Layering/blending, resolved tweens, drag feedback, scroll animation |
| Tools | Debug inspector, profiler, save/load, memory management |
Step 1: Copy im_anim.h and im_anim.cpp to your project.
Step 2: Add two lines after ImGui::NewFrame():
ImGui::NewFrame();
// Add these two lines
iam_update_begin_frame();
iam_clip_update(ImGui::GetIO().DeltaTime);
// Your UI code...
Step 3: Animate! Here's a hover effect:
bool hovered = ImGui::IsItemHovered();
float scale = iam_tween_float(
ImGui::GetID("btn"), ImHashStr("scale"),
hovered ? 1.1f : 1.0f, 0.2f,
iam_ease_preset(iam_ease_out_back),
iam_policy_crossfade,
ImGui::GetIO().DeltaTime
);
That's it. No build system changes, no external dependencies.
Timeline for clips with tooltip helpers:
Support for delayed start:
Open examples/ImAnim_vs2022_Win64.sln in Visual Studio 2022 and select a configuration:
| Configuration | Backend |
|---|---|
Release_Win32_DX11 | Win32 + DirectX11 |
Release_GLFW_OpenGL3 | GLFW + OpenGL3 |
Release_SDL2_OpenGL3 | SDL2 + OpenGL3 |
Release_ImPlatform | ImPlatform abstraction |
Debug configurations are also available for each backend.
Each backend has its own Makefile:
cd examples/glfw_opengl3
make
# or
cd examples/sdl2_opengl3
make
The CMake build compiles the demo against every backend permutation ImPlatform supports, and is what CI runs. It builds ImPlatform from the submodule, so no system Dear ImGui is needed.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target ImAnimDemo_GLFW_Vulkan --parallel
Binaries land in build/bin/. Configurations whose dependencies are missing are
skipped at configure time with a message, so a partial toolchain still builds
whatever it can.
| Configuration | Windows | Linux | macOS |
|---|---|---|---|
Win32_DX11 | yes | - | - |
Win32_DX12 | yes | - | - |
SDL3_DX11 | yes | - | - |
GLFW_Vulkan | yes | yes | yes |
SDL3_Vulkan | yes | yes | yes |
GLFW_Metal | - | - | yes |
SDL3_Metal | - | - | yes |
Win32_OpenGL3 | yes | - | - |
GLFW_OpenGL3 | - | yes | yes |
SDL3_OpenGL3 | - | yes | - |
GLFW is deliberately absent from the DirectX rows: it exposes no native window
handle, so the DirectX backends cannot obtain an HWND from it. Vulkan on macOS
runs through MoltenVK. The Metal configurations currently compile but do not
run, because ImPlatform_InitGfxAPI in ImPlatform's Metal backend still returns
false pending an NSWindow accessor on the GLFW and SDL3 backends.
Comprehensive guides for every ImAnim feature, organized by category. Each doc includes code examples and API references.
The im_anim_demo.cpp file provides a comprehensive playground for exploring all ImAnim features. Call ImAnimDemoWindow() to display it.
| Category | What You'll Find |
|---|---|
| Easing & Tweens | Easing gallery, custom bezier editor, spring physics, per-axis easing |
| Interactive Widgets | Animated buttons, toggle switches, hover cards, progress indicators |
| Clip-Based Animations | Timeline keyframes, looping, callbacks, chaining, layering system |
| Procedural Animations | Oscillators, shake/wiggle effects, Perlin/Simplex noise |
| Motion Paths | Bezier curves, Catmull-Rom splines, path morphing, text along paths |
| Advanced Interpolation | Gradients, transforms, style interpolation, text stagger |
| Utilities | ImDrawList animations, resize-aware helpers, scroll animation, drag feedback |
| Debug Tools | Inspector, profiler, memory stats |
| Stress Test | Performance benchmarks with thousands of concurrent animations |
The demo showcases practical UI patterns you can adapt:
| Animated Tag |
|---|
| Ripple Button |
|---|
| "Wait" Button |
|---|
| Data Visualization |
|---|
Visual examples of ImAnim capabilities in action.
| List Stagger | Grid Stagger | Card Stagger |
|---|---|---|
| Easing Gallery | Custom Bezier | Wave Animations |
|---|---|---|
| Color Blending | Gradient | Transforms |
|---|---|---|
| Motion Path | Text Effects | Variations |
|---|---|---|
| Noise | ImGui Widgets | ImDrawList |
|---|---|---|
| Oscillator Waves | Transform Layers |
|---|---|
Development is supported through Patreon:
The Visual Studio solution is generated using Sharpmake. To regenerate projects after modifying the build configuration:
Prerequisites: .NET 6.0 SDK or later
# First time setup (builds Sharpmake)
cd examples
bootstrap.bat # Windows
./bootstrap.sh # Linux/macOS
# Regenerate projects
generate_projects.bat # Windows
./generate_projects.sh # Linux/macOS
MIT License - see LICENSE for details.
Made for the Dear ImGui community
420 followers · starred Dec 2025
373 followers · starred Dec 2025
529 followers · starred Dec 2025
3,149 followers · starred Dec 2025