vue-img-fade
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.15 • Public • Published

Vue Image Fade

One liner image fade plugin that adds transitions to images on load.

Docs

https://vue-img-fade.vercel.app

Features

  • 🚥 Lightweight ~1kB gzip
  • ️️⛑️ Typescript + Vite
  • 🛠️ Simple One-Liner Directive
  • ✨ Web Animations API for customizing timelines

Installation and Usage

yarn add vue-img-fade

v-fade:

<script setup lang="ts">
import { vFade } from "vue-img-fade";
</script>
<template>
  <div>
    <img v-fade src="..." alt="..." width="100" height="100">
  </div>
</template>

v-fade-auto:

<script setup lang="ts">
import { vFadeAuto } from "vue-img-fade";
</script>
<template>
  <div v-fade-auto>
    <!-- width/height is required for v-fade-auto to work correctly -->
    <img src="..." alt="..." width="100" height="100">
    <img src="..." alt="..." width="100" height="100">
    <!-- ... -->
    <img src="..." alt="..." width="100" height="100">
  </div>
</template>

Custom Options

<template>
  <img v-fade="{ keyframes, animationOptions }" />
</template>

Demo

https://vue-img-fade.vercel.app/demo/using-v-fade.html

Development

Plugin

tsup is used to build the library.

yarn lib:build

Docs

yarn docs:dev
yarn docs:build

Readme

Keywords

Package Sidebar

Install

npm i vue-img-fade

Weekly Downloads

2

Version

0.0.1-alpha.15

License

MIT

Unpacked Size

9.5 kB

Total Files

6

Last publish

Collaborators

  • rumaan