Staaarter

Sticky Image Scroller

A left-aligned header sits above a two-column layout: one tall image that stays pinned in place via CSS position: sticky as the page scrolls, next to a column of feature cards (icon, heading, description) that scroll past it normally.

By Staaarter Team
Feature
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/sticky-image-scroller.json

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

Usage

The file also exports feature89Demo, 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 { Feature89, feature89Demo } from "@/components/blocks/feature/feature89";

export default function Page() {
  return <Feature89 {...feature89Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringundefinedSmall label above the heading.
headingReactNodenoneSection heading.
descriptionstringundefinedSupporting paragraph under the heading.
imageMediaSlotImagenoneThe single image pinned in the sticky column.
featuresStickyScrollerFeature[]noneFeature cards rendered in the scrolling column, in order.
classNamestringnoneExtra classes for the outer section element.

Types

interface StickyScrollerFeature {
  icon: LucideIcon;
  title: string;
  description: string;
}

Behavior notes

  • Fully static Server Component: no event handlers, no client state. The pinned image is pure CSS (`lg:sticky lg:top-24 lg:self-start`), not JavaScript-driven scroll tracking.
  • Below the `lg` breakpoint the image and card column stack vertically and the sticky behavior has no visible effect, since there isn't enough side-by-side height for it to matter.
  • No full-bleed background photo here, unlike this batch's other feature84-88 blocks; the section uses the plain `bg-background` page-section convention.
  • Each card accepts its own icon component reference directly, which is safe here since this is a Server Component (not "use client").