Carousel

Film Strip

A film strip: several shots in view with captions beneath — the rail reads as an overview rather than a page-through.

  • carousel
  • gallery
  • screenshots
  • scroll

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-007?lang=en

Screenshots

  • Главная страница
  • Каталог с фильтрами
  • Страница компонента
  • Инструкция для агента
  • Тёмная тема

Scroll sideways — 5 frames in total

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-007" (Film Strip) 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-007.json

Registry item: https://vibeui.ru/r/carousel-007.json
Installs to: components/vibeui/carousel-007.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 film strip: several shots in view with captions beneath — the rail reads as an overview rather than a page-through.

A film strip: several frames in view, captions beneath, and gentle scroll snapping. Zero dependencies, one file, no client JS.

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

<Carousel007 shots={shots} label="Screenshots" />

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-007-* palette — do not swap it for your theme tokens
- several frames in view: that is what makes it an overview
- captions under the frame, not over it — text over a bright shot disappears
- the layout on the inner card: a container query does not apply to the container itself
- proximity snapping: mandatory snapping fights quick browsing
- the tabIndex on the rail so the keyboard can reach it

## 6. You may change
- the shots array and their hues
- label — the gallery's name
- hint — the line under the rail
- the frame width share

## 7. Rules
- Frames are gradients: with real screenshots put an <img> inside the frame.
- Captions truncate: shorten long names upstream.
- There is no lightbox: opening a shot is the caller's job.
- 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-007.json
https://vibeui.ru/r/carousel-007.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-carousel-007-*. Серверный: хуков нет. Корень объявлен контейнером, раскладка живёт на внутренней карточке: контейнерный запрос действует только на потомков. Кадр занимает треть ширины, в узкой колонке — половину. Привязка прокрутки мягкая (proximity), чтобы обзор не дёргался.

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 Carousel007Shot = {
  label: string
  hue?: number
}

export type Carousel007Props = Omit<
  ComponentPropsWithoutRef<"section">,
  "children"
> & {
  shots?: Carousel007Shot[]
  label?: string
  hint?: string
}

// Идея компонента: галерея-плёнка с подписями под кадрами. Прокрутка
// горизонтальная, но кадры не занимают всю ширину: видно сразу три, и это
// превращает ленту в обзор, а не в пролистывание по одному. Подписи стоят
// под кадром, а не поверх — на светлом снимке текст поверх не читается.
const STYLES = `
:where([data-vibeui-block="carousel-007"]){
--vibeui-carousel-007-bg:oklch(1 0 0);
--vibeui-carousel-007-fg:oklch(0.22 0.014 265);
--vibeui-carousel-007-muted:oklch(0.58 0.014 265);
--vibeui-carousel-007-border:oklch(0.91 0.006 265);
--vibeui-carousel-007-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
container-type:inline-size;
}
[data-vibeui-block="carousel-007"]{
display:block;width:100%;max-width:30rem;box-sizing:border-box;
font-family:var(--vibeui-carousel-007-font);color:var(--vibeui-carousel-007-fg);
}
[data-vibeui-block="carousel-007"] [data-part="card"]{
display:flex;flex-direction:column;gap:0.5rem;
box-sizing:border-box;padding:0.875rem;
background:var(--vibeui-carousel-007-bg);
border:1px solid var(--vibeui-carousel-007-border);border-radius:0.875rem;
}
[data-vibeui-block="carousel-007"] [data-part="title"]{margin:0;font-size:0.9375rem;font-weight:650}
[data-vibeui-block="carousel-007"] [data-part="film"]{
display:flex;gap:0.5rem;
margin:0;padding:0 0 0.375rem;list-style:none;
overflow-x:auto;overscroll-behavior-x:contain;
scroll-snap-type:x proximity;scrollbar-width:thin;
}
/* Треть ширины на кадр: видно сразу несколько, лента читается как обзор. */
[data-vibeui-block="carousel-007"] [data-part="shot"]{
flex:0 0 34%;scroll-snap-align:start;
display:flex;flex-direction:column;gap:0.3125rem;min-width:0;
}
[data-vibeui-block="carousel-007"] [data-part="frame"]{
aspect-ratio:4 / 3;border-radius:0.625rem;
background:
radial-gradient(90% 80% at 25% 20%,oklch(0.92 0.06 var(--vibeui-carousel-007-hue,250)),transparent 70%),
linear-gradient(150deg,oklch(0.8 0.08 var(--vibeui-carousel-007-hue,250)),oklch(0.55 0.1 var(--vibeui-carousel-007-hue,250)));
}
/* Подпись под кадром, а не поверх: на светлом снимке текст поверх пропадает. */
[data-vibeui-block="carousel-007"] [data-part="caption"]{
font-size:0.75rem;line-height:1.35;color:var(--vibeui-carousel-007-muted);
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
[data-vibeui-block="carousel-007"] [data-part="hint"]{font-size:0.75rem;color:var(--vibeui-carousel-007-muted)}
@container (max-width: 24rem){
[data-vibeui-block="carousel-007"] [data-part="shot"]{flex-basis:52%}
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="carousel-007"] *{animation:none!important;transition:none!important}}
`

const DEFAULT_SHOTS: Carousel007Shot[] = [
  { label: "Главная страница", hue: 250 },
  { label: "Каталог с фильтрами", hue: 150 },
  { label: "Страница компонента", hue: 30 },
  { label: "Инструкция для агента", hue: 300 },
  { label: "Тёмная тема", hue: 200 },
]

/**
 * Галерея-плёнка: несколько кадров в кадре и подписи под ними.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Carousel007({
  shots = DEFAULT_SHOTS,
  label = "Скриншоты",
  hint = "Прокрутите вбок — всего кадров: 5",
  className,
  style,
  ...props
}: Carousel007Props) {
  return (
    <>
      <style href="vibeui-carousel-007" precedence="medium">
        {STYLES}
      </style>
      <section
        {...props}
        data-vibeui-block="carousel-007"
        aria-label={label}
        className={className}
        style={style as CSSProperties}
      >
        <div data-part="card">
          <h3 data-part="title">{label}</h3>
          <ul data-part="film" tabIndex={0}>
            {shots.map((shot) => (
              <li
                key={shot.label}
                data-part="shot"
                style={
                  {
                    "--vibeui-carousel-007-hue": shot.hue ?? 250,
                  } as CSSProperties
                }
              >
                <span data-part="frame" aria-hidden="true" />
                <span data-part="caption">{shot.label}</span>
              </li>
            ))}
          </ul>
          <p data-part="hint">{hint}</p>
        </div>
      </section>
    </>
  )
}