react-soundcloud-embedded
v2.0.8
Published
Embedded SoundCloud in your React application
Downloads
164
Readme
react-soundcloud-embedded
🎵 Fork of Embedded SoundCloud widget, now with TypeScript typings.
Installation
npm install react-soundcloud-embedded
or
yarn add react-soundcloud-embedded
Usage
import ReactSoundcloud from 'react-soundcloud-embedded';
Simple usage:
import React, { FC } from 'react'
import ReactDOM from 'react-dom'
import ReactSoundCloud from 'react-soundcloud-embedded'
import MyTrackURL from './somewhere'
const Page = (): FC => (
<div>
<label>My SoundCloud:</label>
<ReactSoundCloud url={MyTrackURL} />
</div>
)
ReactDOM.render(<Page />, document.getElementById('root'))
Props
width
(String) - widget width, default:100%
height
(String) - widget height, default:450px
url
(String) - URL to track, default:https://api.soundcloud.com/tracks/210785280
,autoPlay
(Boolean) - auto play track, default:false
,hideRelated
(Boolean) - hide related, default:false
,showComments
(Boolean) - show comments, default:true
,showUser
(Boolean) - show users, default:true
,showReposts
(Boolean) - show reposts, default:false
,visual
(Boolean) -true
for background image, default:true
,color
(String) - play button color, default:ff5500