
Animation engine for Dear ImGui
ImAnim brings modern animation capabilities to ImGui applications. Write intuitive, UI animations with minimal code.
// Animate anything in one line
float alpha = iam_tween_float(id, channel, hovered ? 1.0f : 0.5f, 0.3f, ease, policy, dt);
- instant-mode compatible – Works naturally with imgui’s paradigm
- zero dependency – Only dear ImGui is required
- big easy collection – 30+ intuitive functions including Spring Physics
- conceptual color blending – oklab and oklch
- Responsive Layout – Anchor-relative animations that survive window resize.
| Social class | capabilities |
|---|---|
| tween | Color with float, vec2, vec4, int, crossfade/cut/cue policies |
| clips | Timeline Keyframe, Looping, Callback, Chaining, Stagger |
| Easy | quad to bounce preset, cubic-bezier, steps, spring physics |
| on the way of | Bezier curves, Catmull-Rom splines, lessons with paths |
| reactive | Oscillators, jitter, jitter, perlin/simplex noise |
| Excessive | Style Interpolation, Scroll Animation, Debug Inspector |
#include "im_anim.h"
// Each frame
iam_update_begin_frame();
iam_clip_update(dt);
// Hover animation
bool hovered = ImGui::IsItemHovered();
float scale = iam_tween_float(
ImGui::GetID("button"), ImHashStr("scale"),
hovered ? 1.1f : 1.0f,
0.15f,
iam_ease_preset(iam_ease_out_back),
iam_policy_crossfade,
dt
);
Add two files to your project:
src/im_anim.h
src/im_anim.cpp
That’s it. No build system changes, no external dependencies.
In full documentation docs/ folder:
demo/ The folder includes a comprehensive demo showcasing all the features:
- interactive easement curve visualizer
- cubic bezier editor
- spring physics playground
- All animation types with live controls
- performance criteria

imgui integration
Development is supported through Patreon:
MIT License – see License for details.
Created for the dear Imgui community
<a href