Skip to content
sveltekit-embed
Audio and podcasts

Spotify

A Spotify show, episode, album, playlist or track.

import { Spotify } from 'sveltekit-embed';
Svelte
1<Spotify spotify_link="show/4XPl3uEEL9hvqMkoZrzbx5" />

spotify_link is the type of content and its ID, the part of the Spotify URL after open.spotify.com/. It works for a show, episode, album, playlist or track.

A taller player

At 352px Spotify shows the track list as well as the player.

Svelte
1<Spotify spotify_link="show/4XPl3uEEL9hvqMkoZrzbx5" height="352px" />

Props

PropTypeDefault
spotify_link

The content type and ID, e.g. show/4XPl3uEEL9hvqMkoZrzbx5.

string''
width

Any CSS width.

string'100%'
height

Any CSS height.

string'152px'
loading

lazy waits until the embed is near the viewport, eager loads it straight away.

'lazy' | 'eager''lazy'
iframe_styles

Inline styles for the iframe. Defaults to the height and width props with rounded corners.

string–

Something wrong on this page? Edit it on GitHub.