npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-scroll-ease

v0.1.5

Published

vue scroll effects

Downloads

7

Readme

vue-scroll-ease

vue-scroll-ease is a Vue 3 directive designed to add smooth reveal animations to your elements as they scroll into view. It's a lightweight and easy-to-use solution for adding scroll-triggered animations to your Vue.js applications.

Installation

You can install vue-scroll-ease via npm:

npm install vue-scroll-ease

Usage

First, register the vue-scroll-ease directive in your Vue app:

import { createApp } from 'vue';
import App from './App.vue';
import VueScrollEase from 'vue-scroll-ease';
createApp(App).use(VueScrollEase).mount('#app');

USAGE

Once registered, you can use the v-scroll-ease directive in your components to add scroll animations:

<template>
  <div v-scroll-ease="{from:200,direction:'left',rotate:360,delay:200}"></div>
</template>

TypeScript Integration

To ensure TypeScript recognizes the vue-scroll-ease module, add the following declaration to your shims-vue.d.ts (or any .d.ts file in your project):

declare module 'vue-scroll-ease' {
    import { Plugin } from 'vue';
    const VueScrollEase: Plugin;
    export default VueScrollEase;
}

Directive Options

| Option | Description | Example Value | Notes | |---------------|---------------------------------------------------------------------------------------------------|---------------------------------|------------------------------------------------------------| | from | Specifies the starting position for the animation based on the direction. Automatically handled based on the chosen direction. | 200 | Determines how far the element should move from its initial position. | | direction | Defines the direction of the animation. | 'left', 'right', 'top', 'bottom', 'left-top', 'right-top', 'left-bottom', 'right-bottom' | Indicates the direction from which the element will animate into view. | | rotate | Adds rotation to the element. Accepts both positive and negative degree values. | 90, -90 | Defines the rotation angle in degrees. | | delay | Sets the delay before the animation starts (in milliseconds). | 200 | Specifies how long to wait before the animation begins. | | duration | Specifies the length of the animation in seconds. | 1, 2.5 | Controls how long the animation lasts. |

Examples

| Option | Example | Result | |---------------|----------------------|-------------------------------------------------| | from | from: 100 | The element starts 100px from its final position. | | direction | direction: 'top' | The element will animate from the top into view. | | rotate | rotate: 45 | The element will rotate 45 degrees during the animation. | | delay | delay: 300 | The animation will start after 300 milliseconds. | | duration | duration: 2 | The animation will last for 2 seconds. |

Key Features

  • Scroll Reveal Ease: Easily apply scroll-triggered reveal animations to elements.

  • Customizable Directions: Animate elements from various directions (top, bottom, left, right, left-top, right-top, left-bottom, right-bottom) with a simple directive.

  • Rotation: Add rotation to elements by specifying the rotate value in degrees.

  • Delay: Introduce a delay before the animation starts using the delay option.

  • Duration: Control the length of the animation with the duration option.

  • Automatic Cleanup: Automatically removes event listeners when elements are unmounted, preventing memory leaks.

  • Lightweight and Fast: Minimal footprint ensures smooth and fast animations without performance degradation.

  • Easy Integration: Quick to set up in any Vue 3 project, with flexible options for customization.

  • TypeScript Support: The current version of vue-scroll-ease includes full TypeScript support.

Changelog

For detailed changes and updates, please see the CHANGELOG.

Issue

To Create Issue ,please see this ISSUE

MIT License

Acknowledgment

Special thanks to Pramod Laha for contributing to the UI part. You can check out his work in the vse repository.