Socket
Socket
Sign inDemoInstall

vue-fast-marquee

Package Overview
Dependencies
21
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-fast-marquee

A lightweight Vue 3 component that harnesses the power of CSS animations to create silky smooth marquees.


Version published
Weekly downloads
230
decreased by-15.44%
Maintainers
1
Install size
20.5 kB
Created
Weekly downloads
 

Readme

Source

Vue Fast Marquee

A lightweight Vue 3 component that harnesses the power of CSS animations to create silky smooth marquees. (Inspired by react-fast-marquee)

vue-fast-marquee

Installation

# if you're using npm
npm i vue-fast-marquee

# if you're using yarn
yarn add vue-fast-marquee

# if you're using pnpm
pnpm i vue-fast-marquee

Usage

The most common use case is to register the component globally.

// main.js or similar
import "vue-fast-marquee/style.css"; // import the styles

import { createApp } from 'vue';
import Marquee from 'vue-fast-marquee';

createApp(App).use(Marquee).mount('#app');

Alternatively you can also import the component locally.

<script setup>
import { Marquee } from 'vue-fast-marquee';
</script>

You can then use the component in your template.

<script setup>
import { Marquee } from 'vue-fast-marquee';
import MyComponent from '../components/MyComponent.vue';
</script>

<template>
    <Marquee>
        <MyComponent />
        <MyComponent />
        <MyComponent />
    </Marquee>
</template>

Props

PropertyTypeDefaultDescription
styleCSSProperties{}Inline style for the container div
classany""Name of the css class to style the container div
autoFillbooleanfalseWhether to automatically fill blank space in the marquee with copies of the children or not
playbooleantrueWhether to play or pause the marquee
pauseOnHoverbooleanfalseWhether to pause the marquee when hovered
pauseOnClickbooleanfalseWhether to pause the marquee when clicked
direction"left" | "right"| "up"| "down""left"The direction the marquee slides

Warning: Vertical marquees are currently experimental and may be buggy. Please swap the values of the marquee's height and width when setting them
speednumber50Speed calculated as pixels/second
delaynumber0Duration to delay the animation after render, in seconds
loopnumber0The number of times the marquee should loop, 0 is equivalent to infinite
gradientbooleanfalseWhether to show the gradient or not
gradientColorstringwhiteThe color of the gradient
gradientWidthnumber | string200The width of the gradient on either side

Events

Event NameDescription
finishEmitted when the marquee finishes scrolling and stops. Only calls if loop is non-zero.
cycleCompleteEmitted when the marquee finishes a loop. Does not call if maximum loops are reached (use onFinish instead).

Keywords

FAQs

Last updated on 18 Feb 2024

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