qer-image-lite

0.0.3 • Public • Published

image-lite

An open source image viewer which is fast and lightweight.

NPM version

📚 Docs | 🧑‍💻 Demos

Features

  • 📦 Out of the box
  • only 2KB size
  • tag: ts
  • This package is zero-dependency and written in Typescript.
  • Simple API

Usage

ES Module

import { imageLite } from 'image-lite';
imageLite.run();

CDN

<script src="https://cdn.jsdelivr.net/npm/qer-image-lite@0.0.2/dist/image-lite.js"></script>

<script>
imageLite.run();
</script>

It will be exposed to global as window.imageLite

More APIs

指定需要应用此效果的图片元素

imageLite.run({
  include: ['img'], // default ['img']
  exclude: ['.exclude'], // default []
});

修改背景颜色

imageLite.run({
  backgroundColor: '#333333' // default #ffffff
});

修改动画速度

imageLite.run({
  animationTime: '500ms' // default '500ms'
});

License

MIT License © 2023-PRESENT QER

Package Sidebar

Install

npm i qer-image-lite

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

8.67 kB

Total Files

5

Last publish

Collaborators

  • wbxl2000