Marquees

component that supports infinite scrolling, allowing for the seamless display of text, images, or videos

Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.
Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.
Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.
Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.
Jane

@jane

I'm at a loss for words. This is amazing. I love it.
Jenny

@jenny

I'm at a loss for words. This is amazing. I love it.
James

@james

I'm at a loss for words. This is amazing. I love it.
Jane

@jane

I'm at a loss for words. This is amazing. I love it.
Jenny

@jenny

I'm at a loss for words. This is amazing. I love it.
James

@james

I'm at a loss for words. This is amazing. I love it.
Jane

@jane

I'm at a loss for words. This is amazing. I love it.
Jenny

@jenny

I'm at a loss for words. This is amazing. I love it.
James

@james

I'm at a loss for words. This is amazing. I love it.
Jane

@jane

I'm at a loss for words. This is amazing. I love it.
Jenny

@jenny

I'm at a loss for words. This is amazing. I love it.
James

@james

I'm at a loss for words. This is amazing. I love it.

Usage

tailwind.config.ts
module.exports = {
  theme: {
    extend: {
      animation: {
        marquee: 'marquee var(--duration) linear infinite',
        'marquee-vertical': 'marquee-vertical var(--duration) linear infinite',
      },
      keyframes: {
        marquee: {
          from: { transform: 'translateX(0)' },
          to: { transform: 'translateX(calc(-100% - var(--gap)))' },
        },
        'marquee-vertical': {
          from: { transform: 'translateY(0)' },
          to: { transform: 'translateY(calc(-100% - var(--gap)))' },
        },
      },
    },
  },
}
marquee.tsx
import { cn } from '@/lib/utils'
 
interface MarqueeProps {
  className?: string
  reverse?: boolean
  pauseOnHover?: boolean
  children?: React.ReactNode
  vertical?: boolean
  repeat?: number
  [key: string]: any
}
 
export default function Marquee({
  className,
  reverse,
  pauseOnHover = false,
  children,
  vertical = false,
  repeat = 4,
  ...props
}: MarqueeProps) {
  return (
    <div
      {...props}
      className={cn(
        'group flex overflow-hidden p-2 [--duration:40s] [--gap:1rem] [gap:var(--gap)]',
        {
          'flex-row': !vertical,
          'flex-col': vertical,
        },
        className
      )}
    >
      {Array(repeat)
        .fill(0)
        .map((_, i) => (
          <div
            key={i}
            className={cn('flex shrink-0 justify-around [gap:var(--gap)]', {
              'animate-marquee flex-row': !vertical,
              'animate-marquee-vertical flex-col': vertical,
              'group-hover:[animation-play-state:paused]': pauseOnHover,
              '[animation-direction:reverse]': reverse,
            })}
          >
            {children}
          </div>
        ))}
    </div>
  )
}

Exammple

Varticle Maruqee

Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jack

@jack

I've never seen anything like this before. It's amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.
Jill

@jill

I don't know what to say. I'm speechless. This is amazing.
John

@john

I'm at a loss for words. This is amazing. I love it.

Logos Maruqee

Microsoft
Apple
Google
Facebook
LinkedIn
Twitter
Microsoft
Apple
Google
Facebook
LinkedIn
Twitter
Microsoft
Apple
Google
Facebook
LinkedIn
Twitter
Microsoft
Apple
Google
Facebook
LinkedIn
Twitter

3D Maruqee

MicrosoftAppleGoogleFacebookLinkedInTwitter
MicrosoftAppleGoogleFacebookLinkedInTwitter
MicrosoftAppleGoogleFacebookLinkedInTwitter
MicrosoftAppleGoogleFacebookLinkedInTwitter