BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/magicui/marquee

Marquee

magicui/marquee
FreeComponent

An infinite scrolling component that can be used to display text, images, or videos.

Live preview

live · rendered by the registry
Rendered by magicui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://magicui.design/r/marquee.json

Source

registry/magicui/marquee.tsxmagicui.design/r/marquee.json
1import { type ComponentPropsWithoutRef } from "react"
2
3import { cn } from "@/lib/utils"
4
5interface MarqueeProps extends ComponentPropsWithoutRef<"div"> {
6 /**
7 * Optional CSS class name to apply custom styles
8 */
9 className?: string
10 /**
11 * Whether to reverse the animation direction
12 * @default false
13 */
14 reverse?: boolean
15 /**
16 * Whether to pause the animation on hover
17 * @default false
18 */
19 pauseOnHover?: boolean
20 /**
21 * Content to be displayed in the marquee
22 */
23 children: React.ReactNode
24 /**
25 * Whether to animate vertically instead of horizontally
26 * @default false
27 */
28 vertical?: boolean
29 /**
30 * Number of times to repeat the content
31 * @default 4
32 */
33 repeat?: number
34}
35
36export function Marquee({
37 className,
38 reverse = false,
39 pauseOnHover = false,
40 children,
41 vertical = false,
42 repeat = 4,
43 ...props
44}: MarqueeProps) {
45 return (
46 <div
47 {...props}
48 className={cn(
49 "group flex gap-(--gap) overflow-hidden p-2 [--duration:40s] [--gap:1rem]",
50 {
51 "flex-row": !vertical,
52 "flex-col": vertical,
53 },
54 className
55 )}
56 >
57 {Array(repeat)
58 .fill(0)
59 .map((_, i) => (
60 <div
61 key={i}
62 className={cn("flex shrink-0 justify-around gap-(--gap)", {
63 "animate-marquee flex-row": !vertical,
64 "animate-marquee-vertical flex-col": vertical,
65 "group-hover:[animation-play-state:paused]": pauseOnHover,
66 "[animation-direction:reverse]": reverse,
67 })}
68 >
69 {children}
70 </div>
71 ))}
72 </div>
73 )
74}

Files it writes

  • registry/magicui/marquee.tsx

Facts

Registry
magicui
Type
registry:ui
Access
Free
Files written
1
Theme wiring
ships cssVars
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on magicui magicui.design magicuidesign/magicui on GitHub Raw registry item This item as JSON

More from magicui

All 247 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AndroidandroidmagicuiComponentsFreeno deps
Animated Beamanimated-beammagicuiComponentsFree1 dep
Animated Circular Progress Baranimated-circular-progress-barmagicuiComponentsFreeno deps
Animated Gradient Textanimated-gradient-textmagicuiComponentsFreeno deps
Animated Grid Patternanimated-grid-patternmagicuiComponentsFree1 dep
Animated Listanimated-listmagicuiComponentsFree1 dep
Animated Shiny Textanimated-shiny-textmagicuiComponentsFreeno deps
Theme Toggleranimated-theme-togglermagicuiComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex