Create smooth animations in Bubble using built-in Animate actions, CSS transitions via HTML elements, scroll-triggered effects, and hover state changes. This tutorial covers every animation method available in Bubble so you can add visual polish to your app without writing custom code for most effects.
Overview: Creating Animations in Bubble
This tutorial covers all the animation techniques available in Bubble, from the native Animate action to CSS-powered transitions and scroll-triggered effects. You will learn how to make elements fade in, slide, bounce, and react to user interaction. Whether you want subtle polish or attention-grabbing effects, this guide gives you practical steps for every approach.
Prerequisites
- A Bubble account with a new or existing app
- Basic familiarity with the Bubble Design tab and workflows
- Understanding of Bubble's Conditional tab on elements
Step-by-step guide
Use the built-in Animate action on a workflow
Use the built-in Animate action on a workflow
Go to the Design tab and select any element you want to animate, for example a Group that contains your hero section text. Go to the Workflow tab and create a trigger. For a page-load animation, use the Do when condition is true event with the condition Page is loaded. Add an action: Element Actions then Animate. Select your target element, choose an animation type (Fade in, Slide left, Bounce, Pulse, and others), and set the duration in milliseconds such as 500. The element will play the animation each time the workflow fires.
Pro tip: Uncheck Visible on page load on the target element and use a Fade in animation on page load for a clean entrance effect.
Expected result: The element plays the selected animation when the page loads.
Add CSS transitions for smooth property changes
Add CSS transitions for smooth property changes
For smoother, more customizable animations, add an HTML element to your page. In the HTML element's content area, paste a style block targeting the element you want to animate. First, give your target element a unique ID in Settings, then Visual Settings, then ID attribute. Then in the HTML element write a style tag with a rule for that ID, setting transition to all 0.3s ease. Now whenever a Conditional changes that element's properties such as background color or opacity, the change will animate smoothly instead of snapping instantly.
1<style>2#hero-card {3 transition: all 0.3s ease;4}5#hero-card:hover {6 transform: translateY(-4px);7 box-shadow: 0 8px 25px rgba(0,0,0,0.15);8}9</style>Expected result: Property changes on the target element transition smoothly over 0.3 seconds instead of changing instantly.
Create hover effects using Conditional formatting
Create hover effects using Conditional formatting
Select any element such as a card Group in the Design tab. Go to its Conditional tab. Click Define another condition. Set the condition to When This Group is hovered. Then change properties like Background color (for example from white to light blue), Border style, or Shadow. Because of the CSS transition added in the previous step, these changes will animate smoothly. For buttons, change the font color and background on hover for a clear interactive feel.
Expected result: Hovering over the element triggers a smooth color, shadow, or border change.
Build scroll-triggered entrance animations
Build scroll-triggered entrance animations
For elements that animate into view as the user scrolls, set the element to hidden by default by unchecking Visible on page load. Add a Do when condition is true event with the condition referencing whether the element's group is visible in the viewport. In the workflow, add an Animate action with Fade in or Slide up on the target element. If you need more precise scroll detection, add an HTML element with a small JavaScript snippet that uses IntersectionObserver to set a custom state when the element enters the viewport.
Pro tip: Set the Do when condition is true event to run only once per session to prevent the animation from replaying as users scroll back up.
Expected result: Elements animate into view as the user scrolls down the page.
Combine multiple animations in sequence
Combine multiple animations in sequence
Create a workflow with multiple Animate actions in sequence. The first Animate action plays on Element A such as fading in the heading. Add a Pause before next action of 200 milliseconds. Then add a second Animate on Element B such as sliding in the description. Add another pause and a third Animate on Element C such as fading in a button. This creates a staggered entrance effect where elements appear one after another.
Expected result: Multiple elements animate in sequence with slight delays between each, creating a cascading entrance effect.
Complete working example
1<style>2/* Smooth transitions for any conditional property changes */3#hero-card {4 transition: all 0.3s ease;5}67/* Hover lift effect */8#hero-card:hover {9 transform: translateY(-4px);10 box-shadow: 0 8px 25px rgba(0,0,0,0.15);11}1213/* Fade-in animation class */14.fade-in {15 animation: fadeIn 0.6s ease forwards;16}1718@keyframes fadeIn {19 from {20 opacity: 0;21 transform: translateY(20px);22 }23 to {24 opacity: 1;25 transform: translateY(0);26 }27}2829/* Slide-in from left */30.slide-left {31 animation: slideLeft 0.5s ease forwards;32}3334@keyframes slideLeft {35 from {36 opacity: 0;37 transform: translateX(-30px);38 }39 to {40 opacity: 1;41 transform: translateX(0);42 }43}4445/* Pulse animation for attention */46.pulse {47 animation: pulse 2s infinite;48}4950@keyframes pulse {51 0% { transform: scale(1); }52 50% { transform: scale(1.05); }53 100% { transform: scale(1); }54}5556/* Card hover state */57.card-hover {58 transition: transform 0.2s ease, box-shadow 0.2s ease;59}60.card-hover:hover {61 transform: translateY(-2px);62 box-shadow: 0 4px 12px rgba(0,0,0,0.1);63}64</style>Common mistakes when creating animations in Bubble.io: Step-by-Step Guide
Why it's a problem: Applying too many animations on a single page
How to avoid: Limit animations to 3-5 key elements per page. Use subtle effects like fade and slight slide rather than dramatic ones like bounce and shake
Why it's a problem: Forgetting to uncheck Visible on page load for entrance animations
How to avoid: Uncheck Visible on page load on the element, then use the Animate action to reveal it when the trigger fires
Why it's a problem: Using pixel-heavy animations on elements inside Repeating Groups
How to avoid: Avoid complex CSS animations inside Repeating Group cells. If needed, limit the Repeating Group to 10-15 visible items
Best practices
- Keep animation durations between 200ms and 600ms for natural-feeling interactions
- Use ease or ease-out timing functions for exits, and ease-in for entrances
- Test all animations on mobile devices since some CSS transforms cause jank on older phones
- Give elements unique ID attributes in Settings before targeting them with CSS
- Use Bubble's native Animate action for simple effects and CSS for more polished results
- Add a pause of 100-200ms between sequential animations for staggered entrances
- Avoid animating layout-affecting properties like width and height and prefer opacity and transform
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to add animations to my Bubble.io app. I need fade-in effects on page load, hover lift effects on cards, and scroll-triggered entrance animations. What are the best approaches using Bubble's built-in tools and CSS?
Add a fade-in animation to my hero section when the page loads. Also add a hover lift effect to the card elements in my repeating group. Use the Animate action for the hero and CSS transitions for the cards.
Frequently asked questions
Does Bubble support CSS keyframe animations?
Yes. Add an HTML element with a style tag containing your @keyframes definitions. Apply the animation class to elements using their ID attribute. This works on all Bubble plans.
Will animations affect my app's performance?
Lightweight CSS animations using opacity and transform have minimal impact. Avoid animating layout properties like width, height, or margin, as these trigger browser reflows. Limit to 3-5 animated elements per page.
Can I animate elements inside a Repeating Group?
Yes, but with caution. Each cell runs independently, so 50 cells with complex animations can lag. Use simple CSS transitions like hover effects and opacity changes rather than keyframe animations inside Repeating Groups.
How do I create a loading spinner animation?
Add an HTML element with a CSS keyframe that rotates a circular border element 360 degrees infinitely. Show this group while data loads and hide it when the Repeating Group's data source is not empty.
Can I trigger animations when data changes?
Yes. Use a Do when condition is true event that watches for data changes such as a custom state update, then run an Animate action on the target element.
Can RapidDev help build custom animated interfaces?
Yes. RapidDev can help design and implement sophisticated animation systems including micro-interactions, page transitions, and interactive data visualizations that go beyond Bubble's built-in capabilities.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation