New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

astro-lazy-youtube-embed

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-lazy-youtube-embed

Embed YouTube videos with a static placeholder which only embeds when you click

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Astro Lazy YouTube Embed

Embed YouTube videos with a static placeholder which only embeds when you click.

This component uses an <iframe> with srcdoc attribute to provide a static placeholder, which mimics the style of a real YouTube embed (at the time of writing).

Install

npm i astro-lazy-youtube-embed

Example

This component uses a default export, so you can import it as whichever name you prefer:

---
import YouTubeVideo from 'astro-lazy-youtube-embed'
---
<YouTubeVideo videoCode="FfTT7mxGw8I" title="Just Curious - Limmy's Homemade Show"/>

<div class="my-8">Provide your own class for additional styling:</div>

<YouTubeVideo
  class="rounded"
  videoCode="L0C5nyOVTzc"
  title="Limmy Teaches Techno - Limmy's Homemade Show"
/>

Rendered version of the above example code

Keywords

FAQs

Package last updated on 13 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc