Infinite Circular Scroll

Vertical list of cards with infinite scroll. Scroll past the last to wrap to the first.

Component

1Card 1
2Card 2
3Card 3
4Card 4
5Card 5
6Card 6
7Card 7
8Card 8
9Card 9
10Card 10
1Card 1
2Card 2
3Card 3
4Card 4
5Card 5
6Card 6
7Card 7
8Card 8
9Card 9
10Card 10
1Card 1
2Card 2
3Card 3
4Card 4
5Card 5
6Card 6
7Card 7
8Card 8
9Card 9
10Card 10

Installation

pnpm dlx shadcn@latest add "https://pulkitxm.com/components/infinite-circular-scroll.json"

Usage

Import

Add the import.

import { InfiniteCircularScroll } from "@/components/infinite-circular-scroll";

Use

Pass cards as children. Scroll infinitely.

<InfiniteCircularScroll itemHeight={56}>
  {items.map((item) => (
    <Card key={item.id} {...item} />
  ))}
</InfiniteCircularScroll>;

Guidelines

  • Pass cards as children. They are arranged in a vertical list.
  • Scrollbar is hidden. Scroll wraps infinitely.
  • itemHeight must match your card height for correct alignment.

Props

All props are optional unless marked required. Use these to customize every aspect of the component.

PropTypeDefaultDescription
childrenReact.ReactNodeCards or items to display in the list.
classNamestringAdditional CSS classes for the container.
itemClassNamestringAdditional CSS classes for each item wrapper.
itemHeightnumber64Height of each item in pixels.

Examples

Basic

Numbered cards 1–10. Scroll infinitely.

1Card 1
2Card 2
3Card 3
4Card 4
5Card 5
6Card 6
7Card 7
8Card 8
9Card 9
10Card 10
1Card 1
2Card 2
3Card 3
4Card 4
5Card 5
6Card 6
7Card 7
8Card 8
9Card 9
10Card 10
1Card 1
2Card 2
3Card 3
4Card 4
5Card 5
6Card 6
7Card 7
8Card 8
9Card 9
10Card 10
import { InfiniteCircularScroll } from "@/components/infinite-circular-scroll";

<InfiniteCircularScroll
  itemHeight={56}
  className="rounded-lg border border-border"
>
  {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((i) => (
    <div
      key={i}
      className="flex items-center gap-3 rounded-lg border bg-muted/50 px-4 py-2"
    >
      <span className="font-mono font-bold">{i}</span>
      <span className="text-muted-foreground text-sm">
        Card {i}
      </span>
    </div>
  ))}
</InfiniteCircularScroll>;

Made with ❤️ by Pulkit & Cursor :)

© 2026 Pulkit. All rights reserved

DMCA Verified

Last updated: