🚀 Socket Launch Week 🚀 Day 4: Introducing Historical Analytics.Learn More
Socket
Sign inDemoInstall
Socket

marquee-content

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marquee-content

MarqueeContent provides a set of tools for creating dynamic and adaptive ticker animations on web pages using GSAP and ScrollTrigger.

4.6.1
latest
Source
npm
Version published
Weekly downloads
38
-11.63%
Maintainers
0
Weekly downloads
 
Created
Source

marquee-content

MarqueeContent provides a set of tools for creating dynamic and adaptive ticker animations on web pages using GSAP and ScrollTrigger. It offers seamless integration with media queries, automatic element cloning for continuous scrolling effects, and efficient handling of resize events. Additionally, it supports customizable animation directions and skew effects, ensuring smooth and visually appealing ticker animations across different screen sizes.

npm GitHub package version NPM Downloads

1.5kB gzipped

Demo


Install

yarn add gsap
yarn add marquee-content

Import

import gsap from 'gsap';
import ScrollTrigger from 'gsap/ScrollTrigger';
import MarqueeContent from 'marquee-content';

gsap.registerPlugin(ScrollTrigger);

Usage

const marquee = new MarqueeContent({
  element: '.marquee',
});

marquee.init();

Options

OptionTypeDefaultDescription
elementstring | HTMLElement.marqueeThe DOM element for the animation. Can be a CSS selector (string) or an HTMLElement object.

Settings

data-*DefaultDescription
data-mc-speed20Sets the speed of the marquee animation. Lower values make the animation faster, while higher values make it slower.
data-mc-directionrtlScroll direction. Options: rtl (default), ltr (left to right), auto (changes direction based on scrolling).
data-mc-skewnullTilts the component along the Y axis. Accepts positive or negative values.
data-mc-minnullMinimum width for the animation to play.
data-mc-maxnullMaximum width for the animation to play.

License

marquee-content is released under MIT license.

Keywords

marquee

FAQs

Package last updated on 09 Mar 2025

Did you know?

Socket

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