How can I ask Webflow to not display the initial state of an interaction on mobile devices?

Published on
September 23, 2023

To ask Webflow not to display the initial state of an interaction on mobile devices, you can use media queries and custom CSS code. Here's a step-by-step guide on how to achieve this:

  1. Select the element that has the interaction applied to it. For example, let's say it's a button element.

  2. In the Interactions panel on the right-hand side, locate the initial state of the interaction.

  3. Click on the small gear icon next to the initial state and select "Hide" to hide the element on all devices.

  4. Now, click on the small media query icon next to the initial state. This will open the media query editor.

  5. In the media query editor, choose the "Desktop" device and select the "display" property.

  6. Set the display property to "block" to make the element visible on desktop devices.

  7. Next, click on the media query icon again and select the "Mobile" device.

  8. In the media query editor for the mobile device, choose the "display" property.

  9. Set the display property to "none" to hide the element on mobile devices.

  10. Finally, make sure to preview and test your changes in the Webflow Designer to ensure that the interaction behaves as desired on different devices.

Using this approach, you can selectively show or hide elements of an interaction based on different devices, such as desktop or mobile. This gives you more control over the visual behavior of your website on different screen sizes.

Additional Questions:

  1. How do I use media queries in Webflow?
  2. Can I create different interactions for different devices in Webflow?
  3. Is it possible to override the initial state of an interaction on specific breakpoints in Webflow?