Animations
Add smooth animations and transitions to Elemnts UI components.
Elemnts UI makes it easy to bring your interfaces to life with smooth, polished animations. Whether you're adding subtle transitions or eye-catching effects, our built-in animations help you create engaging experiences without writing complex CSS.
Built-in Animations
We’ve grouped animations by their purpose to help you find the perfect effect for your use case.
Fades & Scales
Add smooth opacity or size transitions for elements entering or leaving the screen.
fade-in/fade-out– Gradually fade elements in or out.scale-in/scale-out– Grow or shrink elements smoothly.scale-fade-in/scale-fade-out– Combine scaling and fading for a polished effect.
Slides
Move elements in or out of view with directional transitions.
slide-up/slide-down– Vertical movement.slide-left/slide-right– Horizontal movement.
Attention & Feedback
Use these to highlight actions, draw attention, or provide feedback.
pulse– A gentle background color pulse for subtle emphasis.spin– A smooth, continuous rotation.ping– A scaling “notification” effect, great for alerts.bounce– A playful vertical bounce.shake– A quick horizontal shake to indicate an error or warning.float– A gentle, floating motion for decorative or status elements.breath– A soft, rhythmic opacity change for breathing effects.
Specialized
Unique animations for specific interactions.
rotate-in/rotate-out– Rotate elements into or out of view.flip-in/flip-out– Flip effects for cards or panels.marquee-x/marquee-y– Horizontal or vertical scrolling text.expand-height/collapse-height– Animate height changes smoothly.
Quick Start
Apply animations in seconds using the animation prop. Just pick an animation and customize its speed and easing.
Animation Presets
For common use cases, we’ve created pre-configured animation presets. These include timing, easing, and repetition so you don’t have to.
| Preset | Example | Use Case |
|---|---|---|
spin | spin 1s linear infinite | Loading indicators, rotating icons |
pulse | pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite | Subtle emphasis, status indicators |
ping | ping 1s cubic-bezier(0, 0, 0.2, 1) infinite | Notifications, alerts |
bounce | bounce 1s infinite | Playful feedback, success states |
Custom Timing & Easing
Control the speed and feel of animations with built-in timing tokens and easing functions.
Durations
Choose from a range of standard durations to keep your animations consistent.
| Token | Duration |
|---|---|
fastest | 50ms |
faster | 100ms |
fast | 150ms |
moderate | 200ms |
slow | 300ms |
slower | 400ms |
slowest | 500ms |
Easing Functions
Pick an easing curve to control acceleration and deceleration.
Reusable Animation Styles
For complex or reusable animations, define animation styles in your Panda CSS config. These let you create named presets that can be applied across your app with a single prop.
Define a Style
Add a reusable animation style in your config:
Use It Anywhere
Apply your custom style with the animationStyle prop:
Create Variants
Define multiple versions of a style (e.g., fast/slow):
Use them like this:
Keyframes vs. Animation Styles
| Feature | Keyframes | Animation Styles |
|---|---|---|
| Level | Low-level building blocks | High-level reusable presets |
| Purpose | Define how an animation runs (steps, timing) | Define what animation to use (preset) |
| Prop | animation or animationName | animationStyle |
| Flexibility | High (you control every detail) | Low (pre-configured) |
| Reusability | Per-component | Global, reusable |
💡 Tip: Use keyframes for one-off animations. Use animation styles for patterns you reuse often.
Best Practices
✅ Use animations purposefully – Guide attention, confirm actions, or delight users—don’t animate just to animate.
✅ Respect user preferences – Some users prefer reduced motion. Elemnts UI supports this automatically. You can also use _motionReduce modifiers or check prefers-reduced-motion in your app.
✅ Keep it consistent – Stick to built-in durations and easings to maintain a cohesive feel across your app.
✅ Prioritize performance – Prefer animations that use transform and opacity, as they’re GPU-accelerated and don’t cause layout shifts.
🚫 Avoid overdoing it – Too many animations can overwhelm users and slow down your app.

