react-spotify-embed
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

React Spotify Embed

NPM | Demo

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.

Package Sidebar

Install

npm i react-spotify-embed

Weekly Downloads

1,539

Version

2.0.4

License

MIT

Unpacked Size

6.85 kB

Total Files

28

Last publish

Collaborators

  • ctjlewis