Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Infinite Moving Cards, animated React component

A belt of cards that cruises sideways forever and fades out at the edges. Hover and it eases to a stop; grab it and fling, and it coasts on your throw, leaning into the speed, before it settles back to cruising.

  • Free
  • Motion Effects
  • Hover
  • Spring

Like Infinite Moving Cards? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Infinite Moving Cards stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Launch week, sorted

We rebuilt the landing page in two days and it still feels hand-made.

SaaS
Ariana ShawProduct lead, Orbitstack

Smooth on every screen

The loop never jumps, even on a 49-inch monitor in the office.

Motion
Marcus LeeFrontend, Sprintops

People play with it

Visitors grab the reviews and fling them. Time on page went up.

Growth
Lena OkaforDesign manager, Cloudframe

Readable by default

It slows to a stop when you hover, so nobody chases a sentence.

UX
Noah KimuraGrowth designer, Metricly

One less dependency

Replaced two carousel libraries and a custom marquee with this.

React
Sofia BrandtStaff engineer, Kitehaus

Props

PropTypeDefaultWhat it does
items—Cards: { id?, title?, description?, image?, avatar?, name?, role?, rating?, tags? }.
direction"left"Which way the belt cruises.
speed"normal"Cruise speed preset.
pauseOnHovertrueEase to a stop while hovered or focused.
draggabletrueLet people grab the belt and fling it.
gap16Space between cards in px.
looptrueRepeat the items so the belt never runs out.
showGradientMasktrueFade the cards out at the left and right edges (a mask, so it works on any background).
renderItem—Draw your own card.
cardClassName—Classes for each card's wrapper, e.g. a width.
autoplayfalseFlings the belt back and forth every few seconds until someone touches it.
className—Classes for the root.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/infinite-moving-cards
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    infinite-moving-cards/
    InfiniteMovingCards.tsx
    index.ts
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { InfiniteMovingCards } from "@/components/infinite-moving-cards";
    
    export default function Page() {
      return (
        <main>
          <InfiniteMovingCards />
        </main>
      );
    }

Like Infinite Moving Cards? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Infinite Moving Cards stays free.

About Infinite Moving Cards

Infinite Moving Cards is a horizontally scrolling infinite carousel of cards using duplicated arrays and CSS animation for a seamless loop. The scroll direction, speed, and pause-on-hover behavior are configurable. Gradient fade masks at the leading and trailing edges create a clean fade-out that implies the list continues. Use it for testimonials, logo strips, integration showcases, or any linear collection too long to display in a static grid.

Good for

  • Testimonial and review carousels
  • Integration and partner logo strips
  • Feature highlight scrollers
  • Certification and award displays

Infinite Moving Cards questions

How do I change the speed and direction?

Set `speed` to "slow", "normal" or "fast" (about 26, 44 or 74 px per second) and `direction` to "left" or "right". `pauseOnHover` is on by default.

Can I render my own card design?

Yes. Pass `renderItem={(item, index) => ...}` to replace the default card. Without it, each card can show an image, title, description, star rating, tags and an avatar with name and role.

What happens for users who prefer reduced motion?

The track stops scrolling and the cards are shown in place.

How do I install it?

Run `npx shadcn@latest add @nexus-labs/infinite-moving-cards`. It comes with Pro and only needs framer-motion; `showGradientMask` controls the faded edges.

Guides