English | 中文
An exquisite React photo preview component.
<video>
or any HTML
elementtypescript
, 7KB Gzipped
, supports server-side renderingAPI
, zero cost to get startedyarn add react-photo-view
import { PhotoProvider, PhotoView } from 'react-photo-view';
import 'react-photo-view/dist/react-photo-view.css';
function App() {
return (
<PhotoProvider>
<PhotoView src="https://github.com/MinJieLiu/react-photo-view/raw/master/1.jpg">
<img src="https://github.com/MinJieLiu/react-photo-view/raw/master/1-thumbnail.jpg" alt="" />
</PhotoView>
</PhotoProvider>
);
}
Apache-2.0 © MinJieLiu