Atelier UI

搜索组件…

搜索组件…

Marquee

无限滚动的横向/纵向跑马灯,支持悬停暂停、反向、调速与边缘渐隐。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

MarqueeProps

同时支持以下类型的全部属性: React.ComponentProps<"div">

属性类型默认值说明
verticalbooleanfalseScroll vertically instead of horizontally
reversebooleanfalseReverse the scroll direction
pauseOnHoverbooleantruePause while hovered or focused
durationnumber40Seconds for one full loop at speed 1
speednumber1Speed multiplier, 2 is twice as fast
gapstring"1rem"Gap between items, any CSS length
repeatnumber4How many times the content is repeated to fill the strip
fadebooleantrueFade the edges with a mask
fadeSizenumber12Size of the edge fade, in percent of the strip

安装

$ npx shadcn@latest add https://chromotion.dev/r/marquee.json

同类组件