WebberUI

Macbook Scroll

The screen rises out of a MacBook as you scroll

This is a WebberUI Pro component

Free during the launch campaign: sign up or sign in, then hit “Copy install command” in the preview above and it installs straight away — no payment, no credit card. The command below returns 401 while you are signed out.

How to install Pro components →See the plans →

As the page scrolls, the MacBook's screen rotates open from a closed lid and the content gradually emerges. Built with pure CSS 3D transforms, with no dependency on WebGL.

Loading preview…
npx shadcn@latest add "https://webberui.com/r/macbook-scroll.json?t=<install token>"

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

1400
<MacbookScroll />

Installation

npx shadcn@latest add "https://webberui.com/r/macbook-scroll.json?t=<install token>"

Or, once registries are configured in components.json, install it as @webberui/macbook-scroll.

Usage

import { MacbookScroll } from "@/components/ui/macbook-scroll";

<MacbookScroll title="Scroll down to see it">
  <div className="h-full w-full bg-indigo-600" />
</MacbookScroll>

children is rendered inside the screen; when not provided, a gradient placeholder is used. The component brings its own scroll track, so it works as soon as you drop it into a page that scrolls normally.

Props

PropTypeDefaultDescription
titleReact.ReactNodeHeading above the screen, which fades out as the lid opens
childrenReact.ReactNodegradient placeholderThe content shown inside the screen
showGradientbooleantrueOverlay a fade-out gradient at the bottom of the screen
trackHeightnumber1400Height of the scroll track (px); the taller it is, the slower the lid opens
containerReact.RefObject<HTMLElement | null>Ref of a nested overflow scroll container; when not provided, the window is tracked
classNamestringForwarded to the outer track container

Accessibility

  • When the user has "reduce motion" enabled at the system level, a static MacBook opened all the way is rendered directly, with nothing bound to scroll
  • A two-stage mounted render avoids an SSR hydration mismatch, and window is only accessed after mount

On this page