Kinetic UI
Back to Introduction
Interaction Physics

Horizontal Scroll Hijack

Pins a section and creates a horizontal scroll timeline before unlocking.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add horizontal-scroll-hijack

The HorizontalScrollHijack component uses Framer Motion's useScroll and useTransform to pin a vertical section in place while creating a massive horizontal timeline based on scroll velocity.

Live Preview

horizontal-scroll-hijack

Scroll down \/

Section 1
Section 2
Section 3

End of timeline

Installation

npx kinetic-ui-cli@latest add
PropTypeDefaultDescription

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { HorizontalScrollHijack } from "@/components/creative/horizontal-scroll-hijack";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { HorizontalScrollHijack } from "@/components/creative/horizontal-scroll-hijack";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <HorizontalScrollHijack
        scrollHeight="example"
      >
        <div>Content goes here</div>
      </HorizontalScrollHijack>
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.