Staaarter

Wide Slide Reel

A deliberately plain single-frame reel: one image at a time slides via a CSS transform: translateX(-index * 100%) on a flex track, no hover zoom or scale on the frame itself. Round arrow buttons in the header step through it, and a row of bar/pill indicators beside the caption shows and controls position.

By Staaarter Team
Gallery
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/wide-slide-reel.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/gallery/gallery21.tsx instead.

Usage

The file also exports gallery21Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Gallery21, gallery21Demo } from "@/components/blocks/gallery/gallery21";

export default function Page() {
  return <Gallery21 {...gallery21Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"The Reel"Heading shown in the header row next to the arrow controls.
slidesReelSlide[]noneOrdered slides shown one at a time in the reel.
classNamestringundefinedExtra classes for the outer section element.

Types

interface ReelSlide {
  image?: { src: string; alt: string };
  caption: string;
}

Behavior notes

  • Real client-side state: `index` (number) drives the frame track's inline `transform: translateX(-${index * 100}%)` style, with a CSS transition on `transform` for the slide motion.
  • The header's round arrow buttons step `index` forward/backward with wraparound; the pill row beside the caption is also fully interactive, clicking any pill jumps straight to that slide.
  • Deliberately plain by design: the image frame itself has no hover scale/zoom classes, unlike this category's other reel-style blocks - the point of this one is a flat, minimal viewer.
  • The active pill indicator is the wide one (`w-6 bg-primary`); inactive pills are short (`w-1.5 bg-border`), giving the same bar/pill index the caption row describes.
  • "use client" component, so its demo props live in the sibling gallery21.demo.tsx file per this repo's client/demo-file-split rule, not in gallery21.tsx itself.