Marquee
svelte-animations/marqueeFreeBlock
A smooth scrolling marquee component with support for horizontal and vertical directions, pause on hover, and reverse animation.
Install it
npx shadcn@latest add https://sv-animations.vercel.app/r/marquee.jsonSource
1<script lang="ts">2 import { cn } from "$UTILS$";3 import type { Snippet } from "svelte";45 interface MarqueeProps {6 children: Snippet;7 class?: string;8 reverse?: boolean;9 pauseOnHover?: boolean;10 vertical?: boolean;11 repeat?: number;12 [key: string]: any;13 }1415 let {16 children,17 class: className = "",18 reverse = false,19 pauseOnHover = false,20 vertical = false,21 repeat = 4,22 ...rest23 }: MarqueeProps = $props();24</script>2526<div27 {...rest}28 class={cn(29 "group flex gap-(--gap) overflow-hidden p-2 [--duration:40s] [--gap:1rem]",30 {31 "flex-row": !vertical,32 "flex-col": vertical,33 },34 className35 )}36>37 {#each Array(repeat).fill(0) as _, i (i)}38 <div39 class={cn("flex shrink-0 justify-around gap-(--gap)", {40 "animate-marquee flex-row": !vertical,41 "animate-marquee-vertical flex-col": vertical,42 "group-hover:paused": pauseOnHover,43 "direction-[reverse]": reverse,44 })}45 >46 {@render children?.()}47 </div>48 {/each}49</div>
Files it writes
More from Svelte Animations
All 66 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Beamanimated-beam | Svelte Animations | Blocks | Free | 1 dep · 6 files | |
| Animated Circular Progress Baranimated-circular-progress-bar | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Animated Gradient Textanimated-gradient-text | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Animated Grid Patternanimated-grid-pattern | Svelte Animations | Blocks | Free | 1 dep · 2 files | |
| Animated Listanimated-list | Svelte Animations | Blocks | Free | 1 dep · 2 files | |
| Animated Shiny Textanimated-shiny-text | Svelte Animations | Blocks | Free | no deps | |
| Animated Theme Toggleranimated-theme-toggler | Svelte Animations | Blocks | Free | no deps · 2 files | |
| Arc Timelinearc-timeline | Svelte Animations | Blocks | Free | no deps · 3 files |
