# Header Help with Animation

**URL:** <https://forum.bubble.io/t/header-help-with-animation/43868>\
**Category:** Questions\
**Created:** [December 3, 2018, 4:10pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868 "2018-12-03T16:10:27Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 4:10pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/1 "2018-12-03T16:10:27Z")

</div>

Anyone know how I would go about making this header [https://www.groupon.com/merchant?utm\_medium=referral&utm\_campaign=groupon-footer&utm\_source=groupon](https://www.groupon.com/merchant?utm_medium=referral&utm_campaign=groupon-footer&utm_source=groupon)

When you scroll it does this cool animation that turns it white. Any ideas?

I don’t just want to show it with a conditional but want it to animate. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 4:14pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/2 "2018-12-03T16:14:32Z")

</div>

Hi,

I think you can create a workflow with When a condition is true, and using the condition page scrolling position is more than XXX (200 for example). Then use the subsequent actions to animate the elements you want.

Hope it helps!

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 4:30pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/3 "2018-12-03T16:30:05Z")

</div>

Ya I tried that, but it only works if I put it as “once”, not “every time” it scrolls. If I do every time I think it tries to do it every time a scroll which doesn’t work.

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 4:33pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/4 "2018-12-03T16:33:25Z")

</div>

I think it is working on IE but not on Safari. Edit: Actually with further testing it is not working on IE either.

Editor: [https://bubble.io/page?name=index&id=smogtest2&tab=tabs-1](https://bubble.io/page?name=index&id=smogtest2&tab=tabs-1)  
Preview: [https://smogtest2.bubbleapps.io/version-test](https://smogtest2.bubbleapps.io/version-test)?

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 4:33pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/5 "2018-12-03T16:33:59Z")

</div>

maybe playing with states in your actions, at the end of the animations, set state of header to “animationcomplete” to yes

So your workflow might be if scrolling position \> 200 and header’s animation completed is “no”

Then you can do the same on the other side, when scrolling position \< 200 and animation completed is yes then do the “reverse” animation

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 4:34pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/6 "2018-12-03T16:34:55Z")

</div>

I tried that too, I couldn’t get it to work. I guess I can try that again.

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 4:35pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/7 "2018-12-03T16:35:38Z")

</div>

your animation works perfectly for me on chrome…

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 4:36pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/8 "2018-12-03T16:36:58Z")

</div>

Keep scrolling up and down a few times. Does it “break” on you too?

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 4:39pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/9 "2018-12-03T16:39:46Z")

</div>

yeah after some times indeed. Maybe trying to set the scrolling position not at zero but a bit more . (e.g. 10). As I don’t know with the “elastic” behaviour how the position is actually calculated.

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 4:43pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/10 "2018-12-03T16:43:09Z")

</div>

Seems like still after a few times it will “break” I changed it to 10

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 4:55pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/11 "2018-12-03T16:55:20Z")

</div>

It might come then for reactivity of the workflows. As you go fast scrolling up and down, two workflows enter in conflict

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 5:10pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/12 "2018-12-03T17:10:51Z")

</div>

Ya, you think that is a bug? Or…

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 5:16pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/13 "2018-12-03T17:16:31Z")

</div>

Not really a bug, but I guess you get into a sort of limitation. The animation has not yet the time to complete than the other animation is already triggered…

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 5:19pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/14 "2018-12-03T17:19:19Z")

</div>

It’s weird because the conditionals work just fine, to show and hide it without an animation.

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 5:23pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/15 "2018-12-03T17:23:04Z")

</div>

Because it’s instant, whereas the 'sliding effect ’ have a duration  
What if you reduce the animation duration?

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 5:35pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/16 "2018-12-03T17:35:43Z")

</div>

Ya, if I set it to 0 it works. Hmm, I guess you are right, I might not be able to do that the way I want. Unless you have another work around to get it to work.

---

<div class="post-metadata">

**Author:** ![mattmazzega](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattmazzega/32/14401_2.png) [@mattmazzega](https://forum.bubble.io/u/mattmazzega)\
**Post date:** [December 3, 2018, 6:16pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/17 "2018-12-03T18:16:26Z")

</div>

I don’t really see a workaround here, except lowering a bit the animation duration.

But, in a UX point of view, it’s always good to step back and keep in mind that the big majority of users won’t try to scroll quickly up and down to break the header behaviour ! 😉

So it seems good enough now to try it as it…

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [December 3, 2018, 6:38pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/18 "2018-12-03T18:38:20Z")

</div>

Ok, thanks, I set the duration to 200 and it seem like a sort of happy medium. When it breaks it shows up half at least

---

<div class="post-metadata">

**Author:** ![sam.baker1778](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sam.baker1778/32/244975_2.png) [@sam.baker1778](https://forum.bubble.io/u/sam.baker1778)\
**Post date:** [February 21, 2024, 1:00pm UTC](https://forum.bubble.io/t/header-help-with-animation/43868/19 "2024-02-21T13:00:54Z")

</div>

Hey I know this was a while ago but thought this may help others who come across this topic.

I had a similar issue but found a quick workaround.

I wanted to have a transparent header at the top of my page (above an image) and then once the scrolling position got to around 600, a header with a white background replaced the transparent one.

I setup the same workflow that you were talking about but did the animation with a custom duration and then used the “add a pause” action and set that duration to a little bit longer than the duration of the first animation. Then did the next animation for the header with the white background to be displayed.

I found that this meant that the animations weren’t clashing as much.

You can also put in a bit on your event that makes it so that the animation only happens when the other header is visible.

It’s a bit of a compromise but hope it might help a bit.
