Video Block
Click-to-play YouTube/Vimeo embed, pastes into Custom Liquid.
Live preview
See it in action.
Fully interactive, drag, click, scroll inside the frame, toggle to mobile.
About this block
Lazy-loaded video block, shows a poster image until clicked, then swaps in the iframe with autoplay. Zero performance hit upfront. Works with YouTube and Vimeo embed URLs.
Install in 90 seconds
- 01
Open your Shopify admin and go to Online Store → Themes → Customize.
- 02
On any template, click "Add section" where you want the block to appear.
- 03
Choose "Custom Liquid" from the section list.
- 04
Paste the code from this page into the Custom Liquid setting and click Save.
- 05
Edit text and colors directly in the code (look for the comments marking edit points).
The code
Paste the snippet below into the Custom Liquid setting on a Custom Liquid section in your Theme Editor. Edit text, colors, and links directly in the code, every editable spot is marked with an EDIT comment.
Unlock the block code
Video Block is a premium block. Get the full Liquid + scoped CSS paste-ready.
One-time purchase · Lifetime updates · You own the code
What you can customize
Custom Liquid sections don't expose theme-editor settings, so customization happens in the code. Here's what to edit:
| What | How to edit |
|---|---|
| Heading | Find the value in the code and change it directly. |
| Video URL | Set data-src on the .modblo-vid__frame to your YouTube or Vimeo embed URL. |
| Poster image | Replace the gradient background with <img class="modblo-vid__poster" src="...">. |
| Caption | Find the value in the code and change it directly. |
SEO & accessibility notes
- iframe is created on-demand via JS. Lighthouse won't penalize you for embedded video weight.
- Real <button> for click-to-play, keyboard accessible.
- Aspect-ratio 16/9 reserves space, no CLS during load.
Related
