How can I get an embedded video to play when the "watch demo" button is clicked in Webflow?

Published on
September 22, 2023

To get an embedded video to play when the "watch demo" button is clicked in Webflow, you can follow these steps:

  1. Choose a video hosting platform: First, you need to decide where you want to host your video. Some popular options include YouTube, Vimeo, or using a self-hosted video.

  2. Place an embed element on your Webflow page: In your Webflow Designer, add an embed element to the section of your page where you want the video to appear. You can find the embed element under the "Add" panel on the left sidebar.

  3. Get the embed code: Go to your chosen video hosting platform and locate the embed code for your video. This can usually be found by clicking on the "Share" or "Embed" button. Copy the entire embed code.

  4. Paste the embed code into the embed element: Go back to your Webflow Designer and double-click on the embed element you added earlier. In the settings panel, paste the embed code into the HTML field.

  5. Add an interaction to the "watch demo" button: Select the button element in your Webflow Designer. Under the "Interactions" panel, click on the "+" button to create a new interaction.

  6. Set the trigger: In the interaction settings, select the trigger "Click" for the button element.

  7. Set the action: Choose the action "Toggle display" and select the embed element you added earlier as the target. This action will show or hide the embed element when the button is clicked.

  8. Preview and test: Save your changes and use the preview mode in Webflow to see how the video behaves when the "watch demo" button is clicked. Make any necessary adjustments to the size or position of the embed element to fit your design.

By following these steps, you can easily get an embedded video to play when the "watch demo" button is clicked in Webflow.

Example of the steps:

  1. Choose a video hosting platform
  2. Place an embed element on your Webflow page
  3. Get the embed code
  4. Paste the embed code into the embed element
  5. Add an interaction to the "watch demo" button
  6. Set the trigger
  7. Set the action
  8. Preview and test

Additional questions:

  • How do I embed a YouTube video in Webflow?
  • Can I autoplay the embedded video in Webflow?
  • Are there any video settings I need to consider when embedding a video in Webflow?