---
title: "Marquee"
description: "Бегущая строка: бесконечная прокрутка логотипов, отзывов или снимков экрана."
canonical_url: "https://b24-ui.bx-shef.by/docs/components/marquee"
---
# Marquee

> Бегущая строка: бесконечная прокрутка логотипов, отзывов или снимков экрана.

## Использование

Содержимое слота по умолчанию бесконечно прокручивается по кругу.

```vue
<template>
  <B24Marquee>
    <B24Icon name="i-bx24-main-crm" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-tasks" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-chats-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-calendar-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-disk" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-mail" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-telephony-handset-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-robot" class="size-10 shrink-0" />
  </B24Marquee>
</template>
```

> [!TIP]
> Если пользователь просит меньше движения (`prefers-reduced-motion`), анимация выключается и содержимое стоит на месте.

### Пауза при наведении

Пропс `pause-on-hover` останавливает прокрутку, пока указатель над содержимым.

```vue
<template>
  <B24Marquee pause-on-hover>
    <B24Icon name="i-bx24-main-crm" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-tasks" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-chats-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-calendar-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-disk" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-mail" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-telephony-handset-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-robot" class="size-10 shrink-0" />
  </B24Marquee>
</template>
```

### Обратное направление

Пропс `reverse` прокручивает содержимое в обратную сторону.

```vue
<template>
  <B24Marquee reverse>
    <B24Icon name="i-bx24-main-crm" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-tasks" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-chats-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-calendar-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-disk" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-mail" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-telephony-handset-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-robot" class="size-10 shrink-0" />
  </B24Marquee>
</template>
```

### Ориентация

Пропс `orientation` задаёт направление прокрутки. По умолчанию `horizontal`.

```vue
<template>
  <B24Marquee orientation="vertical">
    <B24Icon name="i-bx24-main-crm" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-tasks" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-chats-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-calendar-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-disk" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-mail" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-telephony-handset-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-robot" class="size-10 shrink-0" />
  </B24Marquee>
</template>
```

### Повторы

Пропс `repeat` задаёт, сколько раз содержимое повторяется в ленте. По умолчанию `4`.

```vue
<template>
  <B24Marquee :repeat="6">
    <B24Icon name="i-bx24-main-crm" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-tasks" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-chats-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-calendar-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-disk" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-mail" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-telephony-handset-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-robot" class="size-10 shrink-0" />
  </B24Marquee>
</template>
```

### Затенение краёв

Пропс `overlay` в значении `false` убирает градиент по краям ленты. По умолчанию затенение есть.

```vue
<template>
  <B24Marquee :overlay="false">
    <B24Icon name="i-bx24-main-crm" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-tasks" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-chats-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-calendar-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-disk" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-mail" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-telephony-handset-1" class="size-10 shrink-0" />
    <B24Icon name="i-bx24-main-robot" class="size-10 shrink-0" />
  </B24Marquee>
</template>
```

## Примеры

### Отзывы

Две встречные ленты карточек с отзывами.

```vue [MarqueeTestimonials.vue]
<script setup lang="ts">
import type { UserProps } from '@bxshefby/b24ui-nuxt'

const testimonials: { user: UserProps, quote: string }[] = [{
  user: { name: 'Руководитель отдела продаж', description: 'Оптовая торговля' },
  quote: 'Сделки, звонки и переписка с клиентом в одной карточке: менеджеры перестали терять заявки, а я вижу воронку целиком.'
}, {
  user: { name: 'Директор по маркетингу', description: 'Сеть клиник' },
  quote: 'Формы с сайта сразу попадают в CRM, а записи на приём — в календарь врача. Пропущенных обращений почти не осталось.'
}, {
  user: { name: 'Руководитель проектов', description: 'Студия разработки' },
  quote: 'Задачи с подзадачами, сроками и учётом времени заменили нам три разных сервиса.'
}, {
  user: { name: 'Главный бухгалтер', description: 'Производственная компания' },
  quote: 'Счета и акты формируются из сделки, согласование идёт через бизнес-процесс — без писем и распечаток.'
}, {
  user: { name: 'HR-менеджер', description: 'Розничная сеть' },
  quote: 'Новые сотрудники получают доступы и регламенты в первый день, а заявления на отпуск согласуются за пару кликов.'
}, {
  user: { name: 'Руководитель службы поддержки', description: 'Интернет-магазин' },
  quote: 'Обращения из мессенджеров и почты приходят в одну очередь открытых линий, и ни одно не остаётся без ответа.'
}]
</script>

<template>
  <div class="flex flex-col gap-4 w-full">
    <B24Marquee
      v-for="reverse in [false, true]"
      :key="String(reverse)"
      pause-on-hover
      :reverse="reverse"
      :overlay="false"
      :b24ui="{ root: '[--gap:--spacing(4)]', content: 'w-auto py-1' }"
    >
      <B24PageCard
        v-for="(testimonial, index) in testimonials"
        :key="index"
        variant="outline"
        :description="testimonial.quote"
        :b24ui="{
          description: 'before:content-[open-quote] after:content-[close-quote] line-clamp-3'
        }"
        class="w-64 shrink-0"
      >
        <template #footer>
          <B24User v-bind="testimonial.user" size="xl" :b24ui="{ description: 'line-clamp-1' }" />
        </template>
      </B24PageCard>
    </B24Marquee>
  </div>
</template>
```

### Снимки экрана

Наклонные вертикальные ленты снимков экрана.

```vue [MarqueeScreenshots.vue]
<script setup lang="ts">
const shots = [
  { src: '/b24ui/assets/templates/nuxt/dashboard-light.png', alt: 'Шаблон панели, светлая тема' },
  { src: '/b24ui/assets/templates/nuxt/starter-light.png', alt: 'Стартовый шаблон, светлая тема' },
  { src: '/b24ui/assets/templates/nuxt/dashboard-dark.png', alt: 'Шаблон панели, тёмная тема' },
  { src: '/b24ui/assets/templates/nuxt/starter-dark.png', alt: 'Стартовый шаблон, тёмная тема' }
]

const columns = [
  { reverse: true, shots, root: '[--duration:40s] absolute w-[460px] -start-[100px] -top-[300px] h-[940px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' },
  { reverse: false, shots: [...shots].reverse(), root: '[--duration:40s] absolute w-[460px] -top-[400px] start-[480px] h-[1160px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' },
  { reverse: true, shots, root: 'hidden md:flex [--duration:40s] absolute w-[460px] -top-[300px] start-[1020px] h-[1060px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }
]
</script>

<template>
  <div class="relative w-full h-[400px] bg-(--ui-color-bg-content-secondary) overflow-hidden">
    <B24Marquee
      v-for="(column, index) in columns"
      :key="index"
      :reverse="column.reverse"
      orientation="vertical"
      :overlay="false"
      :b24ui="{ root: column.root }"
    >
      <img
        v-for="shot in column.shots"
        :key="shot.src"
        :src="shot.src"
        width="460"
        height="258"
        :alt="shot.alt"
        loading="lazy"
        class="aspect-video border border-(--ui-color-divider-default) rounded-lg bg-white"
      >
    </B24Marquee>
  </div>
</template>
```

## API

### Пропсы

```ts
/**
 * Props for the Marquee component
 */
interface MarqueeProps {
  /**
   * The element or component this component should render as.
   * @default 'div'
   */
  as?: any;
  /**
   * Pause the marquee on hover.
   * @default false
   */
  pauseOnHover?: boolean | undefined;
  /**
   * Reverse the direction of the marquee.
   * @default false
   */
  reverse?: boolean | undefined;
  /**
   * The orientation of the marquee.
   * @default 'horizontal'
   */
  orientation?: "vertical" | "horizontal" | undefined;
  /**
   * The number of times the marquee should repeat.
   * @default 4
   */
  repeat?: number | undefined;
  /**
   * Display an overlay on the marquee.
   * @default true
   */
  overlay?: boolean | undefined;
  b24ui?: { root?: SlotClass; content?: SlotClass; } | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the Marquee component
 */
interface MarqueeSlots {
  default(): any;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    marquee: {
      slots: {
        root: 'group relative flex items-center overflow-hidden gap-(--gap) [--gap:--spacing(16)] [--duration:20s]',
        content: 'flex items-center shrink-0 justify-around gap-(--gap) min-w-max'
      },
      variants: {
        orientation: {
          horizontal: {
            content: 'w-full'
          },
          vertical: {
            content: 'h-full'
          }
        },
        pauseOnHover: {
          true: {
            content: 'group-hover:[animation-play-state:paused]'
          }
        },
        reverse: {
          true: {
            content: '![animation-direction:reverse]'
          }
        },
        overlay: {
          true: {
            root: "before:absolute before:pointer-events-none before:content-[''] before:z-2 before:from-(--ui-color-bg-content-primary) before:to-transparent after:absolute after:pointer-events-none after:content-[''] after:z-2 after:from-(--ui-color-bg-content-primary) after:to-transparent"
          }
        }
      },
      compoundVariants: [
        {
          orientation: 'horizontal',
          class: {
            root: 'flex-row',
            content: 'flex-row motion-safe:animate-[marquee_var(--duration)_linear_infinite] motion-safe:rtl:animate-[marquee-rtl_var(--duration)_linear_infinite] backface-hidden'
          }
        },
        {
          orientation: 'horizontal',
          overlay: true,
          class: {
            root: 'before:inset-y-0 before:start-0 before:h-full before:w-1/3 before:bg-gradient-to-r rtl:before:bg-gradient-to-l after:inset-y-0 after:end-0 after:h-full after:w-1/3 after:bg-gradient-to-l rtl:after:bg-gradient-to-r backface-hidden'
          }
        },
        {
          orientation: 'vertical',
          class: {
            root: 'flex-col',
            content: 'flex-col motion-safe:animate-[marquee-vertical_var(--duration)_linear_infinite] h-[fit-content] backface-hidden'
          }
        },
        {
          orientation: 'vertical',
          overlay: true,
          class: {
            root: 'before:inset-x-0 before:top-0 before:w-full before:h-1/3 before:bg-gradient-to-b after:inset-x-0 after:bottom-0 after:w-full after:h-1/3 after:bg-gradient-to-t backface-hidden'
          }
        }
      ]
    }
  }
})
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
