1.3.10 • Published 1 year ago
react-media-previewer v1.3.10
Purpose
react-media-previewer
is to create a previewer that is compatible with viewing various media files by one click. It is a component built with React and Typescript. In order to preview media files such as image, video, audio and PDF, we made it.
Installation
npm install react-media-previewer
or
yarn add react-media-previewer
Usage
import { render } from "react-dom";
import PreviewModal from "react-media-previewer";
function App() {
const [visible, setVisible] = useState(false);
return (
<div id="app">
<button onClick={() => setVisible(true)}>open</button>
<PreviewModal
visible={visible}
setVisible={setVisible}
urls={["YOUR IMAGE URL", "YOUR IMAGE URL"]}
/>
</div>
);
}
render(<App />, document.getElementById("app"));
Preview Files
Live Demo
Props
Property | Type | Description |
---|---|---|
visible | bollean | whether the previewer is visible or not |
setVisible | function | function called to close the previewer when previewer is opened |
urls | string[] | media file urls |
Roadmap
- ✅ Image preview
- ✅ Image rotate
- Image scale
- ✅ Multiple images preview
- ✅ Audio and video preview
- ✅ PDF preview
- PDF pagination
- ✅ Word preview
- ✅ Excel preview
- ✅ PPT preview
- More features
- Keyboard support
- ...
License
1.3.10
1 year ago
1.3.9
1 year ago
1.3.8
1 year ago
1.3.7
2 years ago
1.2.8
2 years ago
1.3.6
2 years ago
1.2.7
2 years ago
1.3.5
2 years ago
1.2.6
2 years ago
1.3.4
2 years ago
1.3.3
2 years ago
1.3.2
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago
1.2.9
2 years ago
1.2.5
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.2.0
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago