npx shadcn@latest add https://components.bksh.site/r/marquee.json

Carousel

Marquee

An infinite, seamless horizontal scroller with edge fading.

MotionDesignAnimateExportCreate
Example.tsx
import { Marquee } from "@/components/better/marquee"
const items = ["Motion", "Design", "Animate", "Export", "Create"]
export function Example() {
return (
<Marquee duration={14} reverse={false} hover="slow" slowFactor={3}>
{items.map((t) => (
<span key={t} className="rounded-full border border-border px-4 py-1.5 text-sm font-medium">
{t}
</span>
))}
</Marquee>
)
}

Dependencies

None — just React and Tailwind CSS.

Props

PropTypeDefaultDescription
children*React.ReactNode
classNamestring
durationnumber20Seconds for one full loop.
reversebooleanfalseScroll right-to-left by default; reverse flips it.
hover"pause" | "slow" | "none""pause"What hovering does. One choice, not two flags — pausing and slowing are mutually exclusive, so they can't both be asked for. /
slowFactornumber3How many times slower on hover when `hover` is "slow".
gapstring"1.5rem"Gap between repeated groups (any CSS length).