react-cinemagraph
Generic Cinemagraph component, built for React.
The problem
You want a generic, adaptive, React-friendly, and customizable Cinemagraph-style component within your React application.
This solution ✅
This component - react-cinemagraph
!
Installation ?
$ npm i react-cinemagraph
Usage ?
Alternatively (and preferably, if using webpack):
Props
Every prop from react-cinemagraph
(height, maxHeight, fallbackImage, fallbackImageAlt, mp4Source, webmSource, isBlackAndWhite, isSepia, isBlurred)
height
Type: Number (Is Required)
Height of Cinemagraph in VW units relative to window's width.
maxHeight
Type: Number (Is Required)
Maximum height of Cinemagraph in VH units relative to window's height.
fallbackImage
Type: String
File path for the fallback image to be rendered on unsupported browsers.
fallbackImageAlt
Type: String
'alt' property for the aforementioned fallback image.
mp4Source
Type: String
File path for the Cinemagraph's mp4 file-type video source
webmSource
Type: String
File path for the Cinemagraph's WebM file-type video source
isBlackAndWhite
Type: Boolean
Option to have a black-and-white filter applied to the Cinemagraph
isSepia
Type: Boolean
Option to have a sepia filter applied to the Cinemagraph
isBlurred
Type: Boolean
Option to have a blur filter applied to the Cinemagraph