Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Marquee

    Endless horizontal or vertical scroll of any content, with faded edges, reverse direction, and a pause on hover or focus.

    Laravel React Vue Alpine.js Tailwind CSS Vite
    LaravelReactVueAlpine.jsTailwind CSSVite
    LaravelReactVueAlpine.jsTailwind CSSVite
    LaravelReactVueAlpine.jsTailwind CSSVite
    LaravelReactVueAlpine.jsTailwind CSSVite
    <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>
    import { Marquee } from "@/components/markas/Marquee";
    
    const stack = ["Laravel", "React", "Vue", "Alpine.js", "Tailwind CSS", "Vite"];
    
    export default function MarqueeExample() {
      return (
        <Marquee>
          {stack.map((name) => (
            <span
              key={name}
              className="rounded-full border border-line bg-surface px-3 py-1.5 text-sm font-medium whitespace-nowrap text-ink"
            >
              {name}
            </span>
          ))}
        </Marquee>
      );
    }
    <script setup lang="ts">
    import Marquee from "@/components/markas/Marquee.vue";
    
    const stack = ["Laravel", "React", "Vue", "Alpine.js", "Tailwind CSS", "Vite"];
    </script>
    
    <template>
      <Marquee>
        <span
          v-for="name in stack"
          :key="name"
          class="rounded-full border border-line bg-surface px-3 py-1.5 text-sm font-medium whitespace-nowrap text-ink"
          >{{ name }}</span
        >
      </Marquee>
    </template>
    <script lang="ts">
      import Marquee from "$lib/components/markas/Marquee.svelte";
    
      const stack = [
        "Laravel",
        "React",
        "Vue",
        "Alpine.js",
        "Tailwind CSS",
        "Vite",
      ];
    </script>
    
    <Marquee>
      {#each stack as name (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
        >
      {/each}
    </Marquee>
    ---
    import Marquee from "@/components/markas/Marquee.astro";
    
    const stack = ["Laravel", "React", "Vue", "Alpine.js", "Tailwind CSS", "Vite"];
    ---
    
    <Marquee>
      {
        stack.map((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>
        ))
      }
    </Marquee>
    import { Component } from "@angular/core";
    import { Marquee } from "./markas/marquee.component";
    
    @Component({
      selector: "markas-example",
      imports: [Marquee],
      template: `
        <div markas-marquee>
          @for (name of stack; track 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
            >
          }
        </div>
      `,
    })
    export default class MarqueeExample {
      protected readonly stack = [
        "Laravel",
        "React",
        "Vue",
        "Alpine.js",
        "Tailwind CSS",
        "Vite",
      ];
    }

    Examples

    Testimonials

    Our Blade and React apps finally look the same.
    Dewi Lestari, Product designer
    Copy, paste, ship. No wrapper library to fight.
    John Carter, Frontend lead
    The dark mode tokens saved me a whole weekend.
    Siti Aminah, Indie maker
    Our Blade and React apps finally look the same.
    Dewi Lestari, Product designer
    Copy, paste, ship. No wrapper library to fight.
    John Carter, Frontend lead
    The dark mode tokens saved me a whole weekend.
    Siti Aminah, Indie maker
    Our Blade and React apps finally look the same.
    Dewi Lestari, Product designer
    Copy, paste, ship. No wrapper library to fight.
    John Carter, Frontend lead
    The dark mode tokens saved me a whole weekend.
    Siti Aminah, Indie maker
    Our Blade and React apps finally look the same.
    Dewi Lestari, Product designer
    Copy, paste, ship. No wrapper library to fight.
    John Carter, Frontend lead
    The dark mode tokens saved me a whole weekend.
    Siti Aminah, Indie maker
    Our Blade and React apps finally look the same.
    Dewi Lestari, Product designer
    Copy, paste, ship. No wrapper library to fight.
    John Carter, Frontend lead
    The dark mode tokens saved me a whole weekend.
    Siti Aminah, Indie maker

    Opposite rows

    Accordion Avatar Badge Button Card Carousel
    Modal Popover Select Slider Tabs Tooltip
    AccordionAvatarBadgeButtonCardCarousel
    ModalPopoverSelectSliderTabsTooltip
    AccordionAvatarBadgeButtonCardCarousel
    ModalPopoverSelectSliderTabsTooltip
    AccordionAvatarBadgeButtonCardCarousel
    ModalPopoverSelectSliderTabsTooltip
    AccordionAvatarBadgeButtonCardCarousel
    ModalPopoverSelectSliderTabsTooltip

    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 marquee

    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-hidden and inert.
    • 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-content projects 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

    NameTypeDefaultDescription
    verticalbooleanfalseScroll from bottom to top. Give the marquee a height, such as h-64.
    reversebooleanfalseScroll in the opposite direction.
    durationnumber20Seconds for one full loop. Higher is slower.
    pauseOnHoverbooleantruePause while the pointer is over the marquee. Focus inside always pauses it.
    fadebooleantrueFade the content out at both edges with a CSS mask.
    children / slotReactNode / 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.