react-spotify-embed
v2.0.4
Published
A simple React component for embedding a Spotify song or album preview.
Downloads
7,147
Readme
React Spotify Embed
Use this component to create a Spotify embed for a given Spotify link. In
Spotify, click ••• > Copy Link, and paste it in the <Spotify link={...}>
prop.
Any link should work (albums, songs, etc.). All other props on the Spotify embed widget can also be overridden (see here).
// Displaying a single track.
<Spotify link="https://open.spotify.com/track/5ihDGnhQgMA0F0tk9fNLlA?si=4472348a63dd4f83" />
// Displaying an album.
<Spotify link="https://open.spotify.com/album/0fUy6IdLHDpGNwavIlhEsl?si=mTiITmlHQpaGkoivGTv8Jw" />
// Using `wide` attribute.
<Spotify wide link="https://open.spotify.com/track/5ihDGnhQgMA0F0tk9fNLlA?si=4472348a63dd4f83" />
Demo: Normal song link, Album link, and wide
Example
This repository itself is a Next project demonstrating the use of this component.