A very thin wrapper for displaying Google Slides with React
npm i react-google-slides
yarn add react-google-slides
import ReactGoogleSlides from "react-google-slides";
const SlideShow = () => {
return (
<ReactGoogleSlides
width={640}
height={480}
slidesLink="https://docs.google.com/presentation/d/172oFC8-LBw0GQEymFDbTBn-ORh7wi2ByfUXrXm7H-AM"
slideDuration={5}
position={1}
showControls
loop
/>
);
}
interface ReactGoogleSlidesProps {
slidesLink: string;
loop?: boolean;
slideDuration?: number;
showControls?: boolean;
position?: number;
height?: string | number;
width?: string | number;
containerStyle?: object;
};
Type: string
- required
Link to the google slides presentation
Type: boolean
Default: false
Loops the slideshow after the presentation is finished
Type: number
Default: project default
The duration for each slide to show on screen, this applies to all of the slides
Type: boolean
Default: false
Toggles the slideshow controls at the bottom of the screen
Type: number
Default: 0
What slide to start the slideshow on
Type: number|string
Height of the player, i.e. "100%" or 100
for pixels
Type: number|string
Width of the player, i.e. "100%" or 100
for pixels
Type: object
React Stylesheet to pass in to use as the container style
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
There is an example app you can test your changes with
cd example && yarn
yarn start
This will start the example app at http://localhost:3000/
MIT © AJHenry