Marquee
An infinite scrolling row with edge fade, direction, and pause on hover.
utils
ReactNext.jsTypeScriptMotionTailwindNodePostgres
Installation
$ pnpm dlx shadcn@latest add @soultel/marqueeNo namespace set up? npx shadcn@latest add https://asafefe.dev/r/marquee.json works too.
Manual installation
- 1. Copy the source from the Code tab into components/marquee.tsx.
- 2. Add the keyframes it uses (marquee) to your global CSS. The CLI does this for you.
Usage
import { Marquee } from "@/components/marquee"
export function Example() {
return (
<Marquee>
<span>React</span>
<span>Next.js</span>
<span>TypeScript</span>
</Marquee>
)
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| speed | number | 30 | Seconds per loop. |
| reverse | boolean | false | Scroll the other way. |
| pauseOnHover | boolean | true | Pause while hovered. |
| fade | boolean | true | Mask the edges. |
