Limited Time Offer: Watch All Our Bubble Tutorial Videos for Only $99 per Year!

How to add hover effect to a button in Bubble

In this Bubble.io tutorial video we demonstrate how to add hover effect to a button in Bubble.

With building an app for other users. In particular, it's worth learning a little bit of UX design that stands for User experience. And if you're on any of the massive companies, your Facebooks and your YouTube, they will have invested heavily in UX design and there will be so much of the way that they design their site is to make it intuitive and common sense what items do. And one of the ways that we can do that in Bubble and can feel like a little bit of a chore, but it's an important bit of ensuring that our users don't get frustrated with what we make is a hover effect. How do we do a hover effect?

Button styles

Let me show you. So at the moment I have this button styled by a style named Primary Button, and we have a video on our YouTube channel talking about why this is something that can be overlooked. That style allows you to basically build the look of an element once and then apply it to multiple elements. So we could have multiple buttons and then if I go in and edit the style, let's take the font weight down, it applies it to every instance of the same type of element that has that style applied. Sometimes it's helpful to override that.

So we'll do that by removing style that makes this element then unique. It's not going to have an impact on other buttons. And over in Conditional you can see it's inherited it from that style I've just removed. I have a conditional statement of this button is hovered and then the background colour, and it's quite common just to go with a colour that is slightly darker and we can preview that by hitting the on. So then the UI editor behaves as if this statement is passing as true.

Remember mobile users

Why is that relevant to responsive design? Well, because when we have a user who's on a tablet or a phone, they don't have hover. So as well as bearing in mind that if there's an important part of our app that relies on this element, is hovered to display key information or whatever, really you can't rely on that on a device that doesn't use a mouse because there is no hover. When you're scrolling on an iPhone, for example. Something else to bear in mind is when we start to get down to say, really small screens is someone isn't pointing with a mouse pointer or even likely using a stylus, they're using a finger to navigate your site.

So don't create your buttons too small or too close to each other where they can't clearly tap on the elements that they want to interact with.

 

Latest videos

menu