Props

All the possible props for vue3-marquee are listed below.

direction

The direction for the content to move in. normal corresponds to elements moving left and reverse corresponds to elements moving right.

TypeDefault valueRequiredAccepted values
Stringnormalnonormal or reverse

duration

The time taken for the marquee content to move the width of its own container (in seconds).

TypeDefault valueRequiredAccepted values
Number20noNumber > 0

delay

A delay before the animation starts (in seconds).

TypeDefault valueRequiredAccepted values
Number0noNumber >= 0

loop

The number of times that the marquee animation should run (0 corresponds to infinite).

TypeDefault valueRequiredAccepted values
Number0noNumber >= 0

gradient

Whether to show a gradient overlay.

TypeDefault valueRequiredAccepted values
Booleanfalsenotrue or false

gradient demo

gradientColor

The RGB colors for the color of the gradient.

TypeDefault valueRequiredAccepted values
Array of 3 RGB values[255, 255, 255]no[0 <= Number <= 255, 0 <= Number <= 255, 0 <= Number <= 255]

gradientColor demo

gradientWidth

What portion of the container edges should be taken by the gradient overlay.

TypeDefault valueRequiredAccepted values
String200pxnoAny valid css unit

gradientWidth demo

Any accepted css size unit (eg: 10%, 2em) can be used here. You might need to play around with this unit to get the gradient overlay that you want.

pauseOnHover

Whether to pause the marquee on hover

TypeDefault valueRequiredAccepted values
Booleanfalsenotrue or false

pauseOnHover demo

pauseOnClick

Whether to pause the marquee when you hold the right click button.

TypeDefault valueRequiredAccepted values
Booleanfalsenotrue or false

pauseOnClick demo

clone

This option is still in the experimental stage.

Whether to clone the content. If you want no empty spaces in the animation use this option to auto clone fill content.

TypeDefault valueRequiredAccepted values
Booleanfalsenotrue or false

clone demo