Back to tutorials
User / Level Icon
Gear Time Icon
Time Icon

Lightbox: Autoplay Youtube Video - Derek Siu Headshot smiling

Taught by:

Derek Siu

In the dynamic world of web design, creating engaging and interactive content is crucial for capturing your audience's attention. One effective way to do this is by incorporating autoplay YouTube lightboxes into your Webflow projects. In this tutorial, we'll guide you through the process of seamlessly integrating autoplay YouTube lightboxes into your Webflow site, enhancing user experience and keeping your visitors hooked. Just add:
"autoplay=1" at the end of the Youtube URL.

Custom code to expand video size:

<style> .w-lightbox-frame, .w-lightbox-embed { width:85vw height:85vh } </style>
Copy Code

Why Autoplay YouTube Lightbox?

Autoplay YouTube lightboxes are a fantastic way to showcase videos without overwhelming your visitors with a full-page video player. They allow you to create a more user-friendly experience by keeping your audience engaged while maintaining the overall aesthetics of your website.

Step 1: Set Up Your Webflow Project

Before diving into the YouTube lightbox implementation, make sure you have a Webflow project ready. If you haven't already, sign in to your Webflow account and create a new project or open an existing one.

Step 2: Add a Lightbox to Your Webflow Page

  • Navigate to the Webflow Designer.
  • Drag and drop a Lightbox element onto your desired section of the page.
  • Customize the lightbox settings, such as background color, animation, and close button appearance.

Step 3: Grab the YouTube Video URL

Visit YouTube and locate the video you want to showcase. Click on the 'Share' button below the video, then select 'Embed.' Copy the provided iframe code.

Step 4: Add an Embed Element Inside the Lightbox

  • Go back to your Webflow Designer.
  • Inside the Lightbox, drag and drop an Embed element.
  • Paste the YouTube iframe code into the Embed element.

Step 5: Configure Autoplay Settings

To enable autoplay, modify the YouTube iframe code by adding ?autoplay=1 at the end of the video URL. This ensures that the video starts playing automatically when the lightbox opens.

Step 6: Style and Position the Lightbox Trigger

Customize the design of the Lightbox trigger, which is the element that opens the lightbox. You can use a button, image, or any other element to serve as the trigger.

Step 7: Test Your Autoplay YouTube Lightbox

Preview your Webflow project and click on the Lightbox trigger to ensure that the YouTube video opens in a lightbox and starts playing automatically.


Congratulations! You've successfully implemented an autoplay YouTube lightbox in your Webflow project. By seamlessly integrating interactive video content, you enhance user engagement and create a more captivating website experience for your visitors.

Experiment with different customization options and explore additional features to make your autoplay YouTube lightbox truly unique. Stay creative, and enjoy the benefits of a more engaging and dynamic website!

How Did You Find This Tutorial?
Ready to implement this tutorial?
Get started with Webflow Today!
Webflow Icon Logo
Signup For A Free Webflow Account
Stay updated with my Newsletter!
Have Any Further Questions?
Contact Me
Basic Linkedin Icon
Basic Pinterest Icon
Basiic Maill iicon