# Integration beam

> An animated product scene: soft light pulses travel along curved beams from your inputs into your product and out to your destinations, with live reflow and interactive pause.

Integration sections usually rely on static grids of logos or disconnected cards. Integration Beam turns your stack into a living product scene in a single self-contained file. Your product sits at the centre, flanked by tools on each side joined by smooth cubic S-curves. In synchronized cycles, soft light pulses travel from incoming sources into your hub, and outgoing waves flow out to connected destinations; each arrival triggers a tactile glow ring on the target. Hovering any tool brings its beam forward and dims the rest; clicking or tapping toggles pause with real-time status announcements. The beams are measured from actual rendered tile positions, so the entire scene reflows organically with its container — on narrow widths the tools seamlessly stack above and below, and the curves morph into place.

## Install

```bash
npx shadcn@latest add https://hairlineui.com/r/integration-beam.json
```

Needs React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.

- npm: none
- Hairline UI components it needs (the CLI installs them too): none
- Docs and live preview: https://hairlineui.com/ui/integration-beam
- Registry item (source): https://hairlineui.com/r/integration-beam.json

## Usage

```tsx
import { IntegrationBeam } from "@/components/integration-beam";

<IntegrationBeam
  center={{ name: "Acme" }}
  left={[
    { name: "Slack", logo: <SlackLogo /> },
    { name: "Notion", logo: <NotionLogo /> },
    { name: "Gmail", logo: <GmailLogo /> },
  ]}
  right={[
    { name: "HubSpot", logo: <HubSpotLogo /> },
    { name: "Linear", logo: <LinearLogo /> },
    { name: "Google Drive", logo: <DriveLogo /> },
  ]}
/>
```

## In a marketing hero or feature section

Drop IntegrationBeam into any hero or feature container; give it custom tools and your mark. The block automatically measures its container and reflows from horizontal to vertical on small screens.

```tsx
"use client";

import { IntegrationBeam, type BeamTool } from "@/components/integration-beam";

const INPUTS: BeamTool[] = [
  { name: "GitHub", logo: <GitHubIcon /> },
  { name: "Stripe", logo: <StripeIcon /> },
  { name: "Linear", logo: <LinearIcon /> },
];

const OUTPUTS: BeamTool[] = [
  { name: "Vercel", logo: <VercelIcon /> },
  { name: "Supabase", logo: <SupabaseIcon /> },
  { name: "Discord", logo: <DiscordIcon /> },
];

export function HeroFeature() {
  return (
    <section className="mx-auto max-w-4xl px-4 py-16 text-center">
      <h2 className="text-3xl font-semibold tracking-tight text-foreground sm:text-4xl">
        Connect your entire stack in seconds
      </h2>
      <p className="mx-auto mt-4 max-w-xl text-muted-foreground">
        Stream events, sync records, and automate operations across every service you rely on.
      </p>
      <div className="mt-12 rounded-3xl border border-border/60 bg-card p-6 sm:p-10">
        <IntegrationBeam
          center={{ name: "Hairline" }}
          left={INPUTS}
          right={OUTPUTS}
        />
      </div>
    </section>
  );
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `left` | `BeamTool[]` | `DEFAULT_LEFT` | Tools that send data in (left, or above on narrow widths). Three look best. |
| `right` | `BeamTool[]` | `DEFAULT_RIGHT` | Tools that receive data (right, or below on narrow widths). Three look best. |
| `center` | `BeamCenter` | `DEFAULT_CENTER` | The product in the middle with a name and optional custom logo mark. |
| `className` | `string` | – | Optional CSS class applied to the root element. |
| `label` | `string` | – | Accessible label describing the integration scene for assistive technologies. |

## States

- **syncing**: Pulses travel in synchronized cycles: incoming beams fire with stagger into the hub, followed by an outgoing wave to destinations, while the status chip reads "Syncing…".
- **hover / focus**: Hovering or focusing a tile highlights its beam and pulse in high-contrast blue, while inactive beams softly dim.
- **paused**: Clicking a tile toggles its pause state: any in-flight pulse gently fades, the line turns dashed and faint, and the status chip animates the remaining connected count.
- **arrival glow**: When a pulse reaches the hub or destination tool, a radial glow ring ripples outward via the Web Animations API.
- **stacked morph**: When container width drops below 460px, tiles stack above and below with FLIP transforms while the cubic curves morph from horizontal to vertical.
- **reduced motion**: With prefers-reduced-motion enabled, pulse animations rest and all layout changes settle instantly.

## What it handles

Most integration visuals are static PNG grids or rigid SVGs that break on mobile. Integration Beam measures live DOM tiles, blends cubic curves on container resize, choreographs light waves, and supports interactive pause with full accessibility.

- **Live geometry measurement**: Beams are computed from real tile bounding centers using S-curve cubic beziers. Tangents stay horizontal side-by-side and morph vertical when stacked.
- **Reflows with container queries**: Uses container-type inline-size: when the container drops below 460px, senders stack above and receivers below, gliding into position with FLIP.
- **Interactive sync & pause**: Click any tile to pause its stream. Pulses mid-flight fade away, the beam turns dashed, and the live count chip smoothly glides to its new status.
- **Head & glow animation**: Light pulses glide using SVG dash offsets and a dynamically oriented linearGradient, followed by an arrival pulse ring via the Web Animations API.
- **Zero animation dependencies**: Self-contained in one file with pure React and standard Web APIs: requestAnimationFrame, ResizeObserver, IntersectionObserver, and WAAPI.
- **Accessible & motion-safe**: Includes aria-pressed states, a polite live region for screen readers, keyboard focus handling, and honors prefers-reduced-motion.

## Replaces

a static integration logo grid, an SVG connector diagram, a canvas particle animation, a manual responsive layout hack, a sync status widget

## Where it fits

- **Landing page heroes**: The visual centerpiece showing how your product ingests data from everyday tools and dispatches results.
- **Feature & architecture sections**: Demonstrate real-time sync, webhooks, or workflow automation in an interactive scene.
- **Integration directories**: A playful header for connector hubs and app ecosystems where users can pause or focus streams.
- **Product dashboards**: Live sync status indicator that reflects connected services and ongoing synchronizations.

## Notes

- Self-contained in a single file with zero animation libraries: driven by requestAnimationFrame, ResizeObserver, IntersectionObserver, and the Web Animations API.
- Beams are cubic S-curves computed dynamically between tile center coordinates and the hub center.
- Supports responsive reflow via container queries (@container (max-width: 459px)): transitions from horizontal to vertical stacking with FLIP animations.
- Full accessibility support: role="group", aria-label, aria-pressed on toggleable tools, and an aria-live region announcing pause and connection updates.
- Dark mode automatically activates with .dark or [data-theme="dark"] on any ancestor element.

License: MIT (https://hairlineui.com/license#components)
