Carousel

Logo Marquee

A logo marquee: the list is duplicated and shifts by exactly half, so the seam between repeats never shows.

  • carousel
  • marquee
  • logos
  • animation

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.

put this in the header: https://vibeui.ru/c/carousel-004?lang=en

Trusted by

  • Полёт
  • Северянка
  • Контур
  • Ижевск Групп
  • Мурманская линия
  • Заря
Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

# Install and place "carousel-004" (Logo Marquee) from VibeUI

## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/carousel-004.json

Registry item: https://vibeui.ru/r/carousel-004.json
Installs to: components/vibeui/carousel-004.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.

Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.

## 2. What it is
A logo marquee: the list is duplicated and shifts by exactly half, so the seam between repeats never shows.

A seamless marquee: a duplicated list, a half-width shift, pause on hover and masked edges. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Carousel004 } from "@/components/vibeui/carousel-004"

<Carousel004 items={["Polyot", "Kontur"]} duration={32} />

Read the installed file for the full prop list.

## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.

Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)

## 5. Keep exactly as installed
- the local --vibeui-carousel-004-* palette — do not swap it for your theme tokens
- duplicating the list and shifting by exactly half — otherwise the seam shows
- aria-hidden on the copy: a screen reader must read the list once
- pause on hover: moving text is otherwise unreadable
- the edge mask — the rail should emerge from nothing, not get cut
- the prefers-reduced-motion rule that replaces motion with scrolling

## 6. You may change
- the items array — names or logos
- duration — seconds per full pass
- label — the caption above
- the gap between items

## 7. Rules
- Under twenty seconds the rail starts to flicker: that is a readability threshold, not taste.
- Moving text hurts dyslexic and vestibular users: keep the rail away from important content.
- Insert logos as <img> inside the list items — sizes are deliberately unset.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.

## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.

For developers

npx shadcn@latest add https://vibeui.ru/r/carousel-004.json
https://vibeui.ru/r/carousel-004.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-carousel-004-*. Серверный: хуков нет. Список выводится дважды, вторая копия помечена aria-hidden, анимация сдвигает ленту на половину ширины — так повтор бесшовный. Края подтёрты mask-градиентом. При prefers-reduced-motion анимация выключается, а лента превращается в обычную прокрутку.

Component source

The same file your agent installs. Here in case you would rather copy it by hand.

import type { ComponentPropsWithoutRef, CSSProperties } from "react"

export type Carousel004Props = Omit<
  ComponentPropsWithoutRef<"section">,
  "children"
> & {
  items?: string[]
  label?: string
  /** Секунд на полный проход ленты. Меньше 20 — рябит в глазах. */
  duration?: number
}

// Идея компонента: бегущая лента логотипов. Список дублируется в разметке и
// сдвигается на половину ширины — только так шов между повторами не виден.
// Копия помечена aria-hidden: скринридер должен прочитать список один раз.
// При prefers-reduced-motion лента останавливается и просто прокручивается.
const STYLES = `
:where([data-vibeui-block="carousel-004"]){
--vibeui-carousel-004-bg:oklch(1 0 0);
--vibeui-carousel-004-fg:oklch(0.35 0.014 265);
--vibeui-carousel-004-muted:oklch(0.58 0.014 265);
--vibeui-carousel-004-border:oklch(0.91 0.006 265);
--vibeui-carousel-004-duration:32s;
--vibeui-carousel-004-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="carousel-004"]{
display:flex;flex-direction:column;gap:0.5rem;
width:100%;max-width:30rem;box-sizing:border-box;padding:0.875rem;
background:var(--vibeui-carousel-004-bg);
border:1px solid var(--vibeui-carousel-004-border);border-radius:0.875rem;
font-family:var(--vibeui-carousel-004-font);color:var(--vibeui-carousel-004-fg);
}
[data-vibeui-block="carousel-004"] [data-part="label"]{
font-size:0.75rem;letter-spacing:0.04em;text-transform:uppercase;
color:var(--vibeui-carousel-004-muted);
}
/* Края подтёрты маской: лента должна выезжать из ничего, а не обрываться. */
[data-vibeui-block="carousel-004"] [data-part="window"]{
overflow:hidden;
mask:linear-gradient(to right,transparent,oklch(0 0 0) 8%,oklch(0 0 0) 92%,transparent);
}
[data-vibeui-block="carousel-004"] [data-part="rail"]{
display:flex;width:max-content;gap:2rem;
margin:0;padding:0;list-style:none;
animation:vibeui-carousel-004-run var(--vibeui-carousel-004-duration) linear infinite;
}
[data-vibeui-block="carousel-004"] [data-part="rail"]:hover{animation-play-state:paused}
[data-vibeui-block="carousel-004"] [data-part="item"]{
flex:none;font-size:0.9375rem;font-weight:650;letter-spacing:-0.01em;white-space:nowrap;
}
/* Сдвиг ровно на половину: список продублирован, поэтому шва не видно. */
@keyframes vibeui-carousel-004-run{
to{transform:translateX(calc(-50% - 1rem))}
}
@media (prefers-reduced-motion:reduce){
[data-vibeui-block="carousel-004"] [data-part="rail"]{animation:none!important}
[data-vibeui-block="carousel-004"] [data-part="window"]{overflow-x:auto;scrollbar-width:thin}
}
`

const DEFAULT_ITEMS = [
  "Полёт",
  "Северянка",
  "Контур",
  "Ижевск Групп",
  "Мурманская линия",
  "Заря",
]

/**
 * Бегущая лента логотипов: список продублирован, копия скрыта от скринридера.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Carousel004({
  items = DEFAULT_ITEMS,
  label = "Нам доверяют",
  duration = 32,
  className,
  style,
  ...props
}: Carousel004Props) {
  const palette = {
    "--vibeui-carousel-004-duration": `${Math.max(20, duration)}s`,
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-carousel-004" precedence="medium">
        {STYLES}
      </style>
      <section
        {...props}
        data-vibeui-block="carousel-004"
        aria-label={label}
        className={className}
        style={palette}
      >
        <p data-part="label">{label}</p>
        <div data-part="window">
          <ul data-part="rail">
            {items.map((item) => (
              <li key={item} data-part="item">
                {item}
              </li>
            ))}
            {items.map((item) => (
              <li key={`copy-${item}`} data-part="item" aria-hidden="true">
                {item}
              </li>
            ))}
          </ul>
        </div>
      </section>
    </>
  )
}