Endless horizontal or vertical scroll of any content, with faded edges, reverse direction, and a pause on hover or focus.
<x-markas.marquee>
@foreach (['Laravel', 'React', 'Vue', 'Alpine.js', 'Tailwind CSS', 'Vite'] as $name)
<span class="rounded-full border border-line bg-surface px-3 py-1.5 text-sm font-medium whitespace-nowrap text-ink">{{ $name }}</span>
@endforeach
</x-markas.marquee>Examples
Testimonials
Our Blade and React apps finally look the same.
Copy, paste, ship. No wrapper library to fight.
The dark mode tokens saved me a whole weekend.
Our Blade and React apps finally look the same.
Copy, paste, ship. No wrapper library to fight.
The dark mode tokens saved me a whole weekend.
Our Blade and React apps finally look the same.
Copy, paste, ship. No wrapper library to fight.
The dark mode tokens saved me a whole weekend.
Our Blade and React apps finally look the same.
Copy, paste, ship. No wrapper library to fight.
The dark mode tokens saved me a whole weekend.
Our Blade and React apps finally look the same.
Copy, paste, ship. No wrapper library to fight.
The dark mode tokens saved me a whole weekend.
Opposite rows
Vertical feed
Maya Putri deployed to production
2 min ago
Rizal Hakim opened a pull request
8 min ago
Ana Lim closed 3 issues
15 min ago
John Carter commented on Tabs
21 min ago
Maya Putri deployed to production
2 min ago
Rizal Hakim opened a pull request
8 min ago
Ana Lim closed 3 issues
15 min ago
John Carter commented on Tabs
21 min ago
Maya Putri deployed to production
2 min ago
Rizal Hakim opened a pull request
8 min ago
Ana Lim closed 3 issues
15 min ago
John Carter commented on Tabs
21 min ago
Maya Putri deployed to production
2 min ago
Rizal Hakim opened a pull request
8 min ago
Ana Lim closed 3 issues
15 min ago
John Carter commented on Tabs
21 min ago
Maya Putri deployed to production
2 min ago
Rizal Hakim opened a pull request
8 min ago
Ana Lim closed 3 issues
15 min ago
John Carter commented on Tabs
21 min ago
Installation
npx markasui@latest add marqueepnpm dlx markasui@latest add marqueeyarn dlx markasui@latest add marqueebunx --bun markasui@latest add marquee- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Install the dependency:
npm install alpinejs - Copy the component source below to
resources/views/components/markas/marquee.blade.php.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/Marquee.tsx.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/Marquee.vue.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/lib/components/markas/Marquee.svelte.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/Marquee.astro.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/app/markas/marquee.component.ts.
Usage
<x-markas.marquee :duration="25">
@foreach ($logos as $logo)
<img src="{{ $logo['src'] }}" alt="{{ $logo['name'] }}" class="h-8" />
@endforeach
</x-markas.marquee>
<x-markas.marquee vertical reverse class="h-64">...</x-markas.marquee>import { Marquee } from "@/components/markas/Marquee";
<Marquee duration={25}>
{logos.map((logo) => (
<img key={logo.name} src={logo.src} alt={logo.name} className="h-8" />
))}
</Marquee>
<Marquee vertical reverse className="h-64">...</Marquee><template>
<Marquee :duration="25">
<img
v-for="logo in logos"
:key="logo.name"
:src="logo.src"
:alt="logo.name"
class="h-8"
/>
</Marquee>
<Marquee vertical reverse class="h-64">...</Marquee>
</template><script lang="ts">
import Marquee from "$lib/components/markas/Marquee.svelte";
</script>
<Marquee duration={25}>
{#each logos as logo (logo.name)}
<img src={logo.src} alt={logo.name} class="h-8" />
{/each}
</Marquee>
<Marquee vertical reverse class="h-64">...</Marquee>---
import Marquee from "@/components/markas/Marquee.astro";
---
<Marquee duration={25}>
{logos.map((logo) => <img src={logo.src} alt={logo.name} class="h-8" />)}
</Marquee>import { Component } from "@angular/core";
import { Marquee } from "./markas/marquee.component";
@Component({
selector: "app-logos",
imports: [Marquee],
template: `
<div markas-marquee duration="25">
@for (logo of logos; track logo.name) {
<img [src]="logo.src" [alt]="logo.name" class="h-8" />
}
</div>
`,
})
export class Logos {
logos = [{ name: "Laravel", src: "/laravel.svg" }];
}- Pass the items of one loop. The component renders them twice; the copy is
aria-hiddenandinert. - Each copy is at least as wide as the marquee, so short lists still loop without a gap.
- Motion uses the Web Animations API and pauses on hover, on focus inside, and off screen. The Blade version needs Alpine.js.
- In Angular,
ng-contentprojects once, so the hidden copy is a clone of the items made after the first render. Changes to the items after that are not copied. - With reduced motion, nothing moves. Do not put information users need only inside a marquee.
Props
| Name | Type | Default | Description |
|---|---|---|---|
vertical | boolean | false | Scroll from bottom to top. Give the marquee a height, such as h-64. |
reverse | boolean | false | Scroll in the opposite direction. |
duration | number | 20 | Seconds for one full loop. Higher is slower. |
pauseOnHover | boolean | true | Pause while the pointer is over the marquee. Focus inside always pauses it. |
fade | boolean | true | Fade the content out at both edges with a CSS mask. |
children / slot | ReactNode / slot | - | Items in one loop, laid out in a row (or column) with a 16px gap. |
Accessibility
- The content is rendered twice for a seamless loop; the second copy is aria-hidden and inert, so screen readers and the Tab key reach each item once.
- The animation pauses on hover, while focus is inside, and when the marquee is off screen.
- With reduced motion, nothing moves and the first items stay visible.
- Moving content longer than 5 seconds needs a way to stop it (WCAG 2.2.2): keep essential information out of the marquee or offer it elsewhere.
Related components
More animations components with the same classes in every framework.
- Avatar GroupOverlapping stack of avatars that spreads out on hover, shows each name in a tooltip, and collapses extra people into a +N chip.
- Letter SwapText whose letters slide out and back in with a stagger when its link or button is hovered or focused. Forward, ping-pong, or shuffled order.
- Number TickerNumber that counts up to its value when it scrolls into view, with thousands separators, decimals, and a prefix or suffix.
- Scroll ProgressThin bar at the top of the page or a scrolling container that fills as the reader scrolls.
- Spotlight CardCard with a soft radial light that follows the pointer and a border that glows near it. Lights up on keyboard focus too.
- Text HighlighterA highlight that draws behind inline text from four directions: in view, on hover or focus, on mount, or on command. Solid, marker, underline, or gradient.