Socket
Socket
Sign inDemoInstall

svelte-youtube-embed

Package Overview
Dependencies
0
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    svelte-youtube-embed

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->


Version published
Weekly downloads
506
increased by10.24%
Maintainers
1
Install size
11.4 kB
Created
Weekly downloads
 

Readme

Source

Svelte Youtube Embed

All Contributors

Embeds a clickable youtube thumbnail instead of the iframe. Upon clicking, loads the iframe.

Why?

Installation

npm i -D svelte-youtube-embed

Usage

<script>
  import Youtube from "svelte-youtube-embed";
</script>

<Youtube id="KrSH82gg7BQ" />

<!-- custom play button -->
<Youtube id="KrSH82gg7BQ">
  <button>play</button>
</Youtube>

<!-- Custom overlay -->
<Youtube
  id="KrSH82gg7BQ"
  --overlay-bg-color="hsla(0, 0%, 0%, 0.3)"
  --overlay-transition="all 100ms linear"
/>

<!-- Custom title -->
<Youtube
  id="kgZeIDSHlhQ"
  --title-color="#111111"
  --title-shadow-color="#cccccc"
  --title-font-family="Lato, sans-serif"
/>

<!-- Alternative thumbnail if default thumbnail doesn't show automatically -->
<Youtube id="g50dm1OCV3w" altThumb="{true}" />

The id is youtube video id. In this video link https://www.youtube.com/watch?v=KrSH82gg7BQ, the id is KrSH82gg7BQ.

Demo

site

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Amr
Amr

🎨
sharath Kumar
sharath Kumar

📦
koh
koh

💻
Knarkzel
Knarkzel

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

FAQs

Last updated on 12 Feb 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc