Giter Site home page Giter Site logo

kohbanye / youtube-embed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sharu725/youtube-embed

0.0 0.0 0.0 118 KB

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

Home Page: https://embed.sveltethemes.dev

JavaScript 20.13% CSS 2.86% HTML 6.75% Svelte 70.25%

youtube-embed's Introduction

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="q2Y3f0lHnMs" />

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

<!-- Custom overlay -->
<Youtube id="q2Y3f0lHnMs" --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=q2Y3f0lHnMs, the id is q2Y3f0lHnMs.

Demo

site

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Amr

๐ŸŽจ

sharath Kumar

๐Ÿ“ฆ

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

youtube-embed's People

Contributors

sharu725 avatar amr3k avatar allcontributors[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.