Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshwcomeau/react-play-button
https://github.com/joshwcomeau/react-play-button
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/joshwcomeau/react-play-button
- Owner: joshwcomeau
- Created: 2016-03-27T18:28:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-05T17:27:23.000Z (about 2 years ago)
- Last Synced: 2023-04-09T19:48:30.373Z (over 1 year ago)
- Language: JavaScript
- Size: 1.56 MB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# react-play-button
A React component that gives you a "Play / Stop" button.
### Component props
```js
const propTypes = {
url: PropTypes.string.isRequired,
// Whether or not it's currently playing
active: PropTypes.bool,
// Callback that will be called when the sample is played
play: PropTypes.func,
// Callback that will be called when the sample is stopped
stop: PropTypes.func,
// Diameter of the button, in pixels
size: PropTypes.number,
// Styles for the outer ring that displays time progress
progressCircleWidth: PropTypes.number,
progressCircleColor: PropTypes.string,
// Various colors for the button elements
idleBackgroundColor: PropTypes.string,
activeBackgroundColor: PropTypes.string,
stopIconColor: PropTypes.string,
playIconColor: PropTypes.string,
// How quickly the play icon should morph into the stop icon
iconAnimationLength: PropTypes.number,
// How long the audio should be faded in/out when playing/stopping
fadeInLength: PropTypes.number,
fadeOutLength: PropTypes.number,
};
```