Avara UI

Marquee

An infinite, seamless scrolling container ideal for logos, testimonials, and image galleries.
This MarqueeBlock is engineered to be flawless. By exactly duplicating the content and using a precise CSS calculation (calc(-100% - gap)), the animation loops infinitely without any stuttering, lagging, or "snap back" resets that plague older implementations.
You only supply one set of items — the block duplicates them and offsets the copy by calc(-100% - gap), so the loop never snaps.

Marquee

Passchildrenonce
— the block renders a second aria-hidden copy itself to close the loop. Duplicating them yourself gives a visible double run.
fade
is off by default; on, it masks the first and last 10% so items dissolve instead of being clipped.
pauseOnHover
is off by default; on, it freezes the loop while the pointer is inside.
gap"4rem"
is a raw CSS length that both spaces the items and feeds the loop maths — a % value breaks it.
direction"left"
is the default: content travels leftwards.

Installation

New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @algorize-ui registry once, then copy your styles from the Themes page.

Install Marquee

npx shadcn@latest add @algorize-ui/marquee

components/custom/blocks/MarqueeBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Marquee needs only the cn helper and lucide-react, which the installation guide already put in place.

Examples

Reverse direction

Setdirection"right"
to run the same animation backwards — pair it with a left row above or below for a two-row logo wall.

Vertical

Vertical marquees need a bounded height — without one the container grows to fit both tracks and nothing appears to move.

Usedirection"up"
to scroll the column upwards — it switches the container to flex-col and animates translateY.
direction"down"
runs the same column the other way.
fade
follows the axis on its own, masking the top and bottom edges here.

Speed

speed is a duration for one full pass, not a pixels-per-second rate — the same value moves faster with fewer items.

Usespeed"slow"
for 40s per pass — a calm drift, good for large imagery.
speed"normal"
is the default: 20s per pass.
speed"fast"
gives 10s per pass — ticker pace.
speed{45}
a raw number sets the seconds per pass directly.

Without fade or pause

Setfade{false}
to drop the edge mask and let items run to a hard edge.
pauseOnHover{false}
keeps the loop running under the cursor. Both are the defaults.

Props Reference

PropTypeDefaultDescription
childrenReact.ReactNodeRequiredOne set of items. The block duplicates them internally to close the loop.
direction"left" | "right" | "up" | "down""left"Travel direction. Vertical values need a bounded height on the container.
speed"slow" | "normal" | "fast" | number"normal"Preset pace, or the duration of one full pass in seconds.
pauseOnHoverbooleanfalsePauses the animation while the pointer is over the marquee.
fadebooleanfalseApplies a gradient mask-image so items dissolve at both edges.
gapstring"1rem"CSS gap between items. The loop math accounts for it, so any value stays seamless.