Staaarter

Full-Screen Parallax Feature Sections

A stack of full-viewport sections, each with a photo pinned as a fixed background (a pure CSS `background-attachment: fixed` parallax effect) and centered text overlaid on a translucent scrim. Intentionally full-bleed, unlike this category's usual padded-container sections, so the background image reads edge to edge.

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 dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/full-screen-parallax-feature-sections.json

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

Usage

The file also exports feature118Demo, 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 { Feature118, feature118Demo } from "@/components/blocks/feature/feature118";

export default function Page() {
  return <Feature118 {...feature118Demo} />;
}

Props

PropTypeDefaultDescription
sectionsFeature118Section[]noneFull-viewport sections, each with its own background image and text.
classNamestringundefinedExtra classes for the outer wrapper element.

Types

interface Feature118Section {
  eyebrow?: string;
  heading: ReactNode;
  description: string;
  image: { src: string; alt: string };
}

Behavior notes

  • Plain Server Component. The parallax effect is pure CSS (`bg-fixed`, i.e. `background-attachment: fixed`), no client-side scroll listener or JavaScript involved.
  • Deliberately breaks out of this category's usual `py-16 sm:py-24` padded-container framing: each section is full-bleed and `min-h-screen` so the fixed background shows edge to edge, per this block's brief.
  • Each section renders a translucent `bg-background/70` scrim over the image so heading/description text stays readable regardless of the photo underneath.
  • The background image is applied via inline `style backgroundImage`, since CSS backgrounds (unlike an <img>) have no native alt text; a visually-hidden `sr-only` span carries the same description for screen readers.
  • `background-attachment: fixed` is a well-known iOS Safari limitation (it does not honor fixed attachment inside a scrolling container); the effect degrades gracefully there to a normal scrolling background image, content stays fully readable either way.