Skip to main content
Clever Ops

Zoom Portal

A React scroll dive through a hairline-framed portal, the frame scales past the camera while the scene inside counter-scales into the new stage. Native scroll, fully reversible, Tailwind-themed.

Preview & code

Loading Zoom Portal preview

Installation

pnpm dlx shadcn@latest add @cleverui/zoom-portal

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { ZoomPortal } from '@/components/blocks/zoom-portal'
Exampletsx
import { ZoomPortal } from '@/components/blocks/zoom-portal'

export default function ZoomPortalDemo() {
  return (
    <div>
      <ZoomPortal
        outer={{
          kicker: 'Control room',
          title: 'The whole district fits in one small frame.',
          body: 'Every substation, feeder, and meter of the eastern grid, drawn live at 1:4 scale. Scroll to dive through the glass.',
        }}
        inner={{
          kicker: 'Inside the portal',
          title: 'Eastern district, at full scale.',
          body: 'You are now on the arrived stage, the miniature became the room. Pull back up and the dive reverses to the millimetre.',
        }}
        stats={[
          { label: 'Feeders', value: '148' },
          { label: 'Load now', value: '312 MW' },
          { label: 'Uptime', value: '99.98%' },
        ]}
      />
      {/* scroll runway so the dive has room to play in context */}
      <div aria-hidden="true" className="h-[60vh]" />
    </div>
  )
}

API reference

ZoomPortal accepts the following props.

PropTypeDefaultDescription
outer*ZoomPortalScenescene A, the copy that frames the portal before the dive
inner*ZoomPortalScenescene B, the stage you arrive on inside the portal
statsZoomPortalStat[][]optional mono stats that settle in with the inner stage
diveVhnumber240scroll runway for the dive in vh (default 240)

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface ZoomPortalScene {
  kicker?: string
  title: string
  body?: string
}

export interface ZoomPortalStat {
  label: string
  value: string
}

Frequently asked questions

How do I install the Zoom Portal component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/zoom-portal`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Zoom Portal require?

Zoom Portal has no npm dependencies beyond React and Tailwind CSS itself, so there is nothing extra to install or keep updated.

Can I theme Zoom Portal to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services