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-dynamic-marquee

v0.1.7

Published

Marquee component for Vue - repeatedly translate content across wrapper. Completely responsive to after-render changes with many options to customize.

Downloads

340

Readme

Vue Dynamic Marquee

Build Status

Playground and Demo

A neat docs, demo and playground site can be found on https://yishaiberg.github.io/dynamic-marquee-playground/. The site code is open source if you would like to make any improvements.

Installation

	yarn add vue-dynamic-marquee
	// or 
	npm i vue-dynamic-marquee

Alternatively the component can be delivered via CDN

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-dynamic-marquee.umd.min.js"></script>
    <script>
	    Vue.component('dynamic-marquee', window['vue-dynamic-marquee'])
    </script>

Usage

register globally

    //in main.js
    import DynamicMarquee from 'vue-dynamic-marquee';
    Vue.component('dynamic-marquee', DynamicMarquee);

or import locally

	<template>	
		<div>
			<dynamic-marquee>
			//your content to be animated
			</dynamic-marquee>
		</div>
	</template>

	<script>
	import DynamicMarquee from 'vue-dynamic-marquee';
	</script>

The slot contents will translate across the component's immediate wrapper. Take note that since the slot will be absolutely positioned, the wrapper's width and height cannot rely on the contents.

Props

| Prop | Type | Default | Explanation |:--:|:--:|:--:|--| | direction | 'row'|'column' | 'column' | animation direction | reverse | boolean | false| By default the slot will translate according to document flow - top to bottom for {direction: 'column'} and and for {direction: 'row'} in accordance to ltr-rtl direction style of the wrapper. This behaviour can be reversed with this prop. | repeat | boolean | true | If true the slot will repeat itself so as not to leave whitespace as the slot is finishing to translate out of the wrapper. The component will compute the number of times to repeat the slot in accordance with the repeatMargin prop. | repeatMargin | number | 10 | Pixels between repeated slots. | speed | {type: 'pps'|'duration',number: number} | {type: 'pps', number: 100} | There are two ways to define the translation speed. When choosing 'pps', 'number' is number of pixels per second. When choosing 'duration', 'number' is the number of milliseconds in which the slot will translate from the begining to the end of the wrapper element. | hoverPause | boolean | true | Should animation pause upon hovering over wrapper element. | pause | boolean | false | Use to programmaticlly pause animation.

Responsiveness

The component should be able to accommodate for any changes in wrapper or slot content dimensions that take place on the fly. Number of times to repeat the slot will be recalculated, and the margin between them will be unharmed. This is accomplished thanks to the ResizeObserver Api. Only if the component detects that browser does not support ResizeObserver it will async load a polyfill.

Author

© Yishai Berg Feature requests and PR's are very much welcomed.