A hero section that connects every app, one by one

Build a SaaS hero where the product's hub fans out to every app it integrates with, branches drawing in and waiting apps connecting one after another, in React and Motion.

6 min read

The real component. Click the picture to open it live and try it before you read how it was built.

If your product's value is that it connects to everything, show it connecting. This hero puts a calm headline on a deep panel beside a hub that fans out to each app it reaches.

A trunk and its branches

The hub sits at the top of one trunk; each app hangs off it on a branch that draws itself in. The first few apps are already connected; the rest wait, faded, and connect one after another, each landing with a green tick and what it unlocked.

src/registry/heroes/integrations-hub/hub-tree.tsx

"use client";

import { useCycleCount } from "@/hooks/use-cycle-count";
import type { Brand } from "@/registry/heroes/shared/brand-mark";
import { AppRow, type ConnectedApp } from "./app-row";
import { usePrefersReducedMotion } from "@/hooks/use-prefers-reduced-motion";

const STEP_MS = 1400;
const HOLD_MS = 2800;
// Faint rounded tiles behind the tree, like a canvas grid.
const TILE_COUNT = 48;

interface HubTreeProps {
  hub: Brand;
  apps: ConnectedApp[];
  // How many apps start connected; the rest connect one by one, then the cycle starts over.
  connectedAtStart: number;
}

// The hub fanning out to every app on one trunk, on a soft tiled canvas. Apps past the first few
// connect one after another.
export function HubTree({ hub, apps, connectedAtStart }: HubTreeProps) {
  const isRunning = !usePrefersReducedMotion();
  const waiting = apps.length - connectedAtStart;
  const connectedLater = useCycleCount(waiting + 1, isRunning, { stepMs: STEP_MS, holdMs: HOLD_MS }) - 1;
  const Icon = hub.icon;
  return (
    <div className="relative isolate flex h-full min-h-112 items-center justify-center overflow-hidden bg-zinc-50 p-6">
      <div
        aria-hidden
        className="absolute inset-0 -z-10 grid grid-cols-8 gap-3 mask-radial-from-40% mask-radial-to-100% p-3 opacity-60"
      >
        {Array.from({ length: TILE_COUNT }, (_, index) => (
          <span key={index} className="aspect-square rounded-2xl bg-zinc-200/50" />
        ))}
      </div>
      <div className="flex items-center">
        <span className="flex shrink-0 items-center gap-2 rounded-xl bg-emerald-950 px-4 py-3 text-xl font-medium text-white shadow-xl shadow-emerald-950/20">
          <Icon className="size-6" />
          {hub.name}
        </span>
        <span aria-hidden className="h-px w-8 bg-emerald-950/25" />
        <ul className="relative">
          <span aria-hidden className="absolute top-7 bottom-7 left-0 w-px bg-emerald-950/25" />
          {apps.map((app, index) => (
            <AppRow key={app.name} app={app} isConnected={index < connectedAtStart + connectedLater} />
          ))}
        </ul>
      </div>
    </div>
  );
}
The hub tree on its tiled canvas

src/registry/heroes/integrations-hub/app-row.tsx

"use client";

import { CheckCircle2 } from "lucide-react";
import { AnimatePresence, motion } from "motion/react";
import { EASE_OUT } from "@/lib/motion";
import { cn } from "@/lib/utils";

export interface ConnectedApp {
  name: string;
  // What connecting it unlocked, shown once it's connected.
  status: string;
  // A tile colour for the app's initial, such as "bg-sky-600".
  tone: string;
}

// One app hanging off the trunk: a branch that draws in, then a card with its initial tile, its name and,
// once connected, a green tick with what it unlocked. Waiting apps sit faded.
export function AppRow({ app, isConnected }: { app: ConnectedApp; isConnected: boolean }) {
  return (
    <li className="flex h-14 items-center">
      <motion.span
        aria-hidden
        className="h-px w-10 origin-left bg-emerald-950/25"
        animate={{ scaleX: isConnected ? 1 : 0.35 }}
        transition={{ duration: 0.5, ease: EASE_OUT }}
      />
      <span
        className={cn(
          "flex h-12 items-center gap-3 rounded-xl px-3 pr-4 transition-all duration-500",
          isConnected ? "bg-white shadow-lg shadow-emerald-950/5" : "bg-white/40 opacity-60",
        )}
      >
        <span className={cn("grid size-8 place-items-center rounded-lg text-sm font-semibold text-white", app.tone)}>
          {app.name[0]}
        </span>
        <span className="text-lg text-zinc-900">{app.name}</span>
        <AnimatePresence>
          {isConnected && (
            <motion.span
              initial={{ opacity: 0, x: -6 }}
              animate={{ opacity: 1, x: 0 }}
              exit={{ opacity: 0 }}
              transition={{ duration: 0.35, ease: EASE_OUT }}
              className="hidden items-center gap-1.5 text-sm text-emerald-600 sm:flex"
            >
              <CheckCircle2 className="size-4 fill-emerald-500 text-white" />
              {app.status}
            </motion.span>
          )}
        </AnimatePresence>
      </span>
    </li>
  );
}
One app: branch, card and tick

Performs once, then rests

The connections play the first time the hero is seen and then stop. A hero that keeps moving competes with its own headline.

More articles