Skip to content

animation

Utilities for Tailwind CSS v4 keyframe animations (spin, ping, pulse, bounce) driven by IssContext timestamps.

Transitions & AnimationTailwind v4 Spec
ISS preview
Iced + ISS preview demonstrating animation
ISS preview for animation
use iss::{box_tw, tw, IssViewport};
let ctx = IssViewport::dark(800.0).with_animation_time(elapsed_secs);
let spinner = box_tw(icon, ctx.resolve(tw!("size-6 animate-spin motion-reduce:animate-none")));
Tailwind Class CSS Property / Effect iss::typed Builder
animate-none animation: none; .animate_none()
animate-spin 1s linear infinite 360deg rotation; .animate_spin()
animate-ping 1s cubic-bezier scale + fade pulse; .animate_ping()
animate-pulse 2s cubic-bezier opacity breathing; .animate_pulse()
animate-bounce 1s infinite vertical bounce; .animate_bounce()
animate-[spin_2s_linear_infinite] Arbitrary keyframe string; .animate_custom("spin 2s linear infinite")
  • Pair with motion-reduce:animate-none to respect reduced-motion preferences, and sample keyframes with eval_animation(style, secs).

transition-property · rotate · scale · opacity