social-embed
Embed YouTube, Spotify, DailyMotion, Vimeo, and more with one simple tag.
Web Component
Use the <o-embed>
custom element anywhere HTML is supported.
No extra services or servers required.
The custom element in @social-embed/wc
:
- Works seamlessly with popular editors and frameworks.
- Instantly transforms YouTube, Vimeo, Spotify, and more into embeds.
- Easy to set up: just import the script and place
<o-embed>
.
Try it live:
Playground (Demos / Examples): CodePen · JSFiddle
Get startedURL Tools (Library)
Prefer to handle IDs and embed URLs directly?
@social-embed/lib
is a TypeScript library for:
- Extracting IDs from any recognized provider URL (YouTube, DailyMotion, Loom, and more).
- Converting those IDs into embeddable formats.
- Normalizing or validating incoming URLs.
Playground (Demos / Examples): CodePen (console) · JSFiddle
Get started