Skip to main content

Installation

info

Want the <o-embed></o-embed> library? See @social-embed/wc.

Quickstart#

Packages#

NPM:

npm i @social-embed/lib

yarn:

yarn add @social-embed/lib

via CDNs#

If you support ESM / URLs (such as via code sandboxes and streaming imports in snowpack, you can also import via like this:

// unpkg
import { getYouTubeIdFromUrl } from 'https://www.unpkg.com/@social-embed/lib?module';
// skypack
import { getYouTubeIdFromUrl } from 'https://cdn.skypack.dev/@social-embed/lib';

Where to next?#

  • Click on the Playground menu in the top right for sandboxes
  • View the API docs