Socket
Socket
Sign inDemoInstall

vue-dynamic-marquee

Package Overview
Dependencies
12
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-dynamic-marquee

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


Version published
Maintainers
1
Created

Readme

Source

Vue Dynamic Marquee

Installation

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

Alternatively the component can be delivered via CDN from jsdelivr or unpkg.

Usage

register globaly

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

or import locally

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

import DynamicMarquee from 'vue-dynamic-marquee';

Props

PropTypeDefaultExplanation
direction'row'|'column''column'animation direction
reversebooleanfalseBy default the slot will translate according to document flow - top to bottom for {direction: 'column'} and and for {direction: 'row'} in accordance to rtl-ltr direction style of the wrapper. This behaviour can be reversed with this prop.
repeatbooleantrueIf 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.
repeatMarginnumber10Pixels 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.
hoverPausebooleantrueShould animation pause upon hovering over wrapper element.
pausebooleanfalseUse to programmaticlly pause animation.

Responsiveness

The component should be able to accomodate for any changes in wrapper or slot content dimensions. This is accomplished thanks to the ResizeObserver Api. Only if the component detects the browser does not support ResizeObserver it will async load a polyfill.

Coming Soon

  • Demo and playground page.
  • React version. Feature requests and PR's are very much welcomed.

Keywords

FAQs

Last updated on 19 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc