Media

Macbook Scroll

The screen rises out of a MacBook as you scroll

This is a WebberUI Pro component

The install command below needs a licence to run; without one it returns 401.

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.

Bring this into your project

Run this command in your project folder. The CLI adds the source and dependencies; then follow the usage example below.

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

New project or installation trouble? Start here →

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
Active edited usageDefault props
<MacbookScroll/>

The complete example includes the preview layout and data. Install the component first, then paste this file into your project.

Installation

npx webberui@latest add "https://webberui.com/r/macbook-scroll.en.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.ReactNode—Heading 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
classNamestring—Forwarded 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