@voezy-kit/awesome-viewer
v0.0.1-beta.2
Published
``` npm i -S @voezy-kit/awesome-viewer ```
Downloads
1
Readme
Awesome Viewer
Install
npm i -S @voezy-kit/awesome-viewer
Usage
Initialize
import "@voezy-kit/awesome-viewer/dist/bundle.css";
import { ImgViewer } from "@voezy-kit/awesome-viewer";
const imgViewer = new ImgViewer({
imgList: [
{
// This is the source location of your image
src: 'https://via.placeholder.com/4000x2000',
// And you can put some introduction in it
desc: 'An image of 4000X2000 pixels',
}
],
});
Visibility
// Show image viewer
imgViewer.show();
// Hide image viewer
imgViewer.hide();
Update
imgViewer.updateState({
imgList: [
{
src: 'https://via.placeholder.com/1000x2000',
desc: 'An image of 1000X2000 pixels',
}
],
})
Destroy
imgViewer.destroy();