Skip to content

lite-embed ⚡️

Embed iframes without hustle! Look a simple example below 👇

lite-embed comes from lightweight embedding library. It's a simple and lightweight embedding library for your sites. Currently, only works with YouTube and Vimeo, but will be extended to support more providers soon.

Overview

import { Vimeo, YoutubeLite } from '@lite-embed/react';

export default function App() {
  return (
    <>
      <VimeoLite urlOrId="https://vimeo.com/476064230" />

      <YoutubeLite urlOrId="https://www.youtube.com/watch?v=dQw4w9WgXcQ" />
    </>
  );
}
<script setup lang="ts">
import { VimeoLite, YoutubeLite } from '@lite-embed/vue';
</script>

<template>
  <div>
    <vimeo-lite url-or-id="https://vimeo.com/476064230"></vimeo-lite>

    <youtube-lite
      url-or-id="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ></youtube-lite>
  </div>
</template>

In these examples, we show a simple code snippet for React and Vue, the urlOrId is the only required prop and can be any type pf URL from YouTube/Vimeo and even a video ID from YouTube/Vimeo.

Also, you can use the prop aspectRatio to set the aspect ratio of the embed, the default is 16 / 9.

Features

  • Embed component that is quick, light, and reusable.
  • Load embeds without add extra seconds to your page.
  • Fully customizable.
  • SSR support.
  • TypeScript ready.

And a lot more.

Community

stars@lite-embed/react downloads@lite-embed/vue downloads

@lite-embed/react license@lite-embed/vue license

Feel free to join the discussions on GitHub!