Skip to content

Marquee

The Marquee text effect sets up a continuous, infinite horizontal scrolling ticker by duplicating the target element's content and translating it horizontally.


Basic Leftward Scroll

The speed option defines the horizontal translation velocity in pixels per second. The default scroll direction is 'left'.

SYSTEM STATUS: OPTIMAL • ALL SERVICES OPERATIONAL • NO ISSUES DETECTED •
60 FPS

Fast Rightward Scroll

Setting the direction parameter to 'right' reverses the scroll alignment.

CRITICAL THREAT BLOCKER DEPLOYED • SECURITY LOGS INJECTED •
60 FPS

Variable Speed Configuration

Specifying a higher speed parameter accelerates the horizontal translation.

RAPID_MARKET_TICKER: AMZN +4.2% • AAPL -1.8% • GOOG +5.7% •
60 FPS

Playback Controls Integration

The returned Timeline instance supports external interactive controls like .resume(), .pause(), and .reverse().

INTERACTIVE RUNTIME STATUS CONTROLS • CLICK CONTROLLER BUTTONS TO PLAYBACK TWEEN •
60 FPS

Custom Deceleration Easing

Applying a non-linear ease value creates a variable-velocity scrolling movement rather than the standard linear sweep.

EASED PROGRESSIVE FLOW • ACCELERATING AND DECELERATING MOTION •
60 FPS

API Reference

javascript
import { marquee } from 'animx/plugins/Text'

const tl = marquee(target, config)

Configuration Options

OptionDefaultDescription
speed50Horizontal translation velocity in pixels per second.
direction'left'Animation alignment direction: 'left' or 'right'.
durationundefinedAbsolute transition duration in seconds (overrides speed).
ease'none'Deceleration profile name.
repeat-1Loop iterations count. Default is -1 (infinite looping).
pausedfalseStandard playback initialization lock flag.