@gfazioli/mantine-marquee
Mantine component for seamless, GPU-accelerated infinite-scrolling loops — a drop-in superset of the core Marquee with responsive props, masked or colored fade edges, a keyboard-focus pause, and 3D isometric and circle variants.
Upgrading from v4? v5 resolves
gapthroughtheme.spacing, like core. See the Upgrade guide for the size table and the other breaking changes.
Installation
After installation import package styles at the root of your application:
You can import styles within a layer @layer mantine-marquee by importing @gfazioli/mantine-marquee/styles.layer.css file.
Comparison with Mantine core Marquee
Since version 9.0, Mantine core ships a first-party Marquee component. The basics overlap — a seamless loop of repeated children, horizontal or vertical, reverse and pause on hover — but the two make different trade-offs.
| Capability | Marquee | Core Marquee |
|---|---|---|
3D variants variant="isometric" lays the loop on a tilted plane (tilt, perspective, rotate, skew); variant="circle" spins the children around a 3D ring (radius, tilt) | ||
Fade edges over any background By default Marquee fades with a CSS mask (true alpha), so it works over images and gradients — core always paints a gradient in fadeEdgeColor, which has to match the background | ||
Fade edge shapes linear, ellipse or rect, and rect takes a separate size per axis ([x, y]) — core fades the two scroll edges | ||
Responsive orientation and gap vertical and gap accept Mantine breakpoint maps, e.g. vertical on mobile and horizontal from md | ||
Reduced motion With prefers-reduced-motion: reduce the scroll stops and the items stay readable — core keeps animating | ||
Pause on keyboard focus With pauseOnHover, the loop also stops while a link or button inside has keyboard focus, so it does not scroll away from the user — core pauses on hover only | ||
Theme colors for the fade fadeEdgeColor takes a theme key (blue, blue.3, dark.7) as well as any CSS color, and paints every fade shape — core passes the string to CSS as it is, so red means the CSS named color | ||
Horizontal and vertical scrolling Both: orientation="vertical" in core; vertical in Marquee, which also accepts orientation as an alias | ||
Reverse, pause on hover, gap and repeat Same props, different defaults — repeat 2 here, 4 in core; duration 20 s here, 100000 ms (100 s) in core. gap takes the same values in both: a theme.spacing key (md by default), a number or any CSS value | ||
Styles API Both: root, content, group, with classNames, styles, vars and attributes, and the data-orientation, data-reverse and data-pause-on-hover attributes on the root. Marquee adds stage, plane, tilt, ring and item for the 3D variants | ||
Custom fade color fadeEdgeColor paints the fade edges in a color, in both |
When to use which. Reach for the core Marquee for a plain logo or text strip on a solid background, with nothing extra to install. Reach for Marquee when the strip sits over an image or a gradient, when you want a 3D isometric plane or a rotating ring, when the layout changes at a breakpoint, or when the motion should stop for users who ask for less of it or who reach it with the keyboard. Moving from core is a matter of changing the import: see Drop-in for Mantine core Marquee.
Usage
The Marquee component allows you to create a marquee effect with any content.
Fade edges
The fadeEdges prop adds a smooth fade effect at the edges of the scroll area using CSS mask-image.
It accepts true, "linear", "ellipse", or "rect" — passing true is equivalent to "linear".
Use fadeEdgesSize to control how much of the edge is faded ("xs" | "sm" | "md" | "lg" | "xl" or a percentage string).
Linear
fadeEdges="linear" applies a gradient mask on the leading and trailing scroll edges.
This works for both horizontal and vertical layouts, and it is ideal for content that enters and exits from the sides.
Ellipse
fadeEdges="ellipse" applies a radial elliptical mask that fades all around the border.
This is orientation-independent — it works identically for horizontal and vertical marquees.
It is particularly effective for logo carousels, icon showcases, or any content where a vignette effect is desired.
Circle
Since the ellipse mask uses radial-gradient(ellipse closest-side), applying fadeEdges="ellipse" to a square element
(w and h are equal) produces a perfectly circular mask. No additional prop is needed — the geometry does the work.
John Doe
Jane Doe
Jessica Doe
Jack Doe
Jill Doe
John Doe
Jane Doe
Jessica Doe
Jack Doe
Jill Doe
Rect
fadeEdges="rect" uses two intersected linear gradients (mask-composite: intersect) to fade all 4 edges independently.
The horizontal gradient controls left/right, the vertical gradient controls top/bottom — at the corners the alpha values multiply naturally, creating a smooth diagonal falloff.
fadeEdgesSize accepts a [horizontal, vertical] tuple for independent axis control.
For example fadeEdgesSize={['lg', 'xs']} applies a large fade on left/right and a small fade on top/bottom.
Fade color
By default the fade is a mask: the content fades to transparent, into whatever is behind the marquee, so it works over images and gradients.
Set fadeEdgeColor to paint the edges in a color instead. It takes a theme color key ("blue", "blue.3", "dark.7") or any CSS color, and works with every shape and variant; fadeEdges still turns the fade on.
Use it to fade into a brand color that differs from the background, or to reproduce the core Marquee look with fadeEdgeColor="var(--mantine-color-body)".
Multiple
The Marquee component allows you to create a marquee effect with multiple items.
Vertical
The Marquee component allows you to create a marquee effect with multiple items in vertical direction.
Pause on hover and focus
pauseOnHover stops the loop while the pointer is over the marquee, and also while a link or a button inside it has keyboard focus,
so a keyboard user can stop on an item instead of chasing it. Press Tab to move into the demo below.
The pause is pure CSS (:hover and :focus-visible): it costs no re-render and works before hydration, in all three variants.
Isometric variant
Set variant="isometric" to lay the marquee on a plane tilted back in 3D space — content scrolls
across a surface, as if the items were resting on a table. The existing scroll loop is reused
unchanged, so every other prop (reverse, duration, pauseOnHover, gap, vertical) keeps working.
Use tilt to control the plane inclination in degrees and perspective to control the depth in
pixels (smaller values exaggerate the effect). Add rotate (in-plane rotateZ) and skew
(horizontal skewX) to dial in a classic ¾ isometric (2.5D) look. The 3D scene is composited as a
flat image on the root element, so fadeEdges masks still apply on top of the tilted plane — the
linear fade automatically follows the projected scroll axis, so it keeps fading the leading and
trailing items even when the plane is rotated.
Circle variant
Set variant="circle" to distribute the children around a 3D ellipse ring that rotates
continuously, like a carousel. Each child is positioned once around the ring (no clones) and the
whole ring spins — rotateY(360deg) equals rotateY(0deg), so the loop is perfectly seamless.
The items are mounted on the rim facing outward, so the ring reads as a 3D carousel/cylinder. Use
radius to size the ring (a single number for a circular ring, or a [rx, ry] tuple for an
explicit ellipse), tilt for the viewing angle (positive views the ring from above, negative from
below), and perspective for the depth. reverse, duration and pauseOnHover work as usual;
repeat, gap and vertical do not apply to a ring.
The circle variant needs a height — set h (or mih) on the component.
Responsive vertical
The vertical prop accepts a responsive breakpoint object in addition to a plain boolean.
This lets you switch between vertical and horizontal layouts at different viewport widths
using Mantine's useMatches hook under the hood.
Responsive gap
The gap prop also accepts a responsive breakpoint object.
This is useful when switching layout direction at a breakpoint — you can pair it with a different gap size.
Drop-in for Mantine core Marquee
This component is a superset of the built-in @mantine/core Marquee: existing snippets keep working
after changing the import path. The props, the gap values, the Styles API selectors (root, content, group),
attributes and the root data attributes carry over. A few things to know:
orientation="horizontal" | "vertical"is accepted as an alias ofvertical, andfadeEdgeSizeas an alias offadeEdgesSize(singular spelling).durationis expressed in seconds here, while@mantine/coremeasures it in milliseconds: coreduration={100000}corresponds toduration={100}. The default is 20 s here and 100 s in core: setduration={100}to keep core's pace.fadeEdgesis off by default here and on by default in core: addfadeEdgesto keep the fade after switching. Its default size is"xs"(11%) here and 5% in core: setfadeEdgeSize="5%"to match.fadeEdgeColorresolves theme colors:"red"is the theme's red here, while core hands the string to CSS as the named color. Any other CSS color means the same in both.
On top of that you get responsive gap and vertical, fade-edge shapes (linear, ellipse, rect) as a mask or in a color, per-axis fade sizes for rect,
a pause on keyboard focus, and the isometric and circle 3D variants.
Example: Testimonials
Your customers feedback is important to you. Use Marquee to display your testimonials.
John Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jane Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jessica Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jack Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jill Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
John Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jane Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jessica Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jack Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Jill Doe
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Example: Branding
One of the most common use cases for Marquee is to create branding banners.
Example: Isometric tech stack
The isometric variant turns a plain logo strip into a 3D "tech stack on a desk" hero — perfect for
landing pages, integrations sections, or a tools showcase.
React
TypeScript
Next.js
Mantine
Vercel
Tailwind
Figma
GitHub
React
TypeScript
Next.js
Mantine
Vercel
Tailwind
Figma
GitHub
Example: Circle avatar ring
The circle variant arranges items around a rotating 3D ring — a carousel for team avatars,
community members, or a brand showcase. A slightly negative tilt views the ring from just below;
hover to pause and click an avatar.