ReactHive

Arc Gallery

Galleries 6

About

An endless WebGL carousel that swells when it moves. Scroll, drag or throw it: the faster it goes, the more the panel passing the middle swells toward you while the rest sink back and the pictures split into colour. Stop, and it eases flat. A round button follows the pointer.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Arc Gallery to your project and fits it to your theme.

Code

How Arc Gallery is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import type { ReactNode } from "react";

import { ArcGallery, type ArcItem } from "@/components/ui/arc-gallery";

const settings = {
  curve: 1,
  split: 1,
  parallax: 1
};

/* The demo's Google Fonts. In a Next.js app, use next/font/google instead. */
if (typeof document !== "undefined" && !document.getElementById("arc-gallery-fonts")) {
  const style = document.createElement("style");
  style.id = "arc-gallery-fonts";
  style.textContent = "@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:wght@300..800&display=swap'); .rh-host-grotesk { font-family: 'Host Grotesk', sans-serif; }";
  document.head.appendChild(style);
}

const sans = { className: "rh-host-grotesk", style: { fontFamily: "'Host Grotesk', sans-serif" } };

/** A gentle entrance: rises and fades in, a beat after `delay` seconds. */
function Rise({ children, delay = 0, className = "" }: { children: ReactNode; delay?: number; className?: string }) {
  return (
    <div className={className} style={{ animation: `rh-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) ${delay}s both` }}>
      <style>{`@keyframes rh-rise { from { opacity: 0; transform: translateY(28px); } } @media (prefers-reduced-motion: reduce) { @keyframes rh-rise { from { opacity: 0; } } }`}</style>
      {children}
    </div>
  );
}

// Vivid motion blur glows against the near black.
const WORK = [
  { name: "Afterglow", line: "Identity and site for a night of dance, built around one long exposure.", photo: "violet-blur" },
  { name: "Heat", line: "A booking site for a movement studio, with classes that fill themselves.", photo: "orange-dancers" },
  { name: "Turn", line: "Season pages for a folk dance company, from the poster to the box office.", photo: "spinning-dress" },
  { name: "Green Room", line: "A casting agency site that opens on the reel and gets out of the way.", photo: "green-dancer" },
  { name: "Tide", line: "A swimwear shop that feels like the last hour on the beach.", photo: "beach-blur" },
  { name: "Encore", line: "Listings and tickets for a dance hall, readable from the back row.", photo: "stage-dancers" },
  { name: "Night Market", line: "Maps, stalls and opening times for a city market after dark.", photo: "neon-crowd" },
  { name: "Procession", line: "A fashion lookbook told in long exposures, one frame at a time.", photo: "yellow-walk" },
];

const ITEMS: ArcItem[] = WORK.map((w) => ({ image: `https://reacthive.dev/library/photos/${w.photo}.webp`, title: w.name, caption: w.line, href: "#" }));

function DemoContent(props: Partial<typeof settings> = {}) {
  const v = { ...settings, ...props };

  return (
    <main className={`${sans.className} h-svh overflow-hidden bg-[#111111] text-[#f2f2f2]`}>
      <ArcGallery
        items={ITEMS}
        curve={Number(v.curve)}
        split={Number(v.split)}
        parallax={Number(v.parallax)}
        accent="#f2f2f2"
        ink="rgba(242,242,242,0.66)"
        titleWeight={400}
        captionWeight={300}
        cursor={<span className="flex h-16 w-16 items-center justify-center rounded-full bg-[#f2f2f2] text-[12px] font-semibold text-[#111111] shadow-[0_16px_36px_-12px_rgba(0,0,0,0.7)]">View</span>}
      >
        <div className="absolute inset-x-0 top-0 mx-auto max-w-[1448px] px-5 pt-[9svh] md:px-8">
          <Rise>
            <h2 className="text-[clamp(2rem,4vw,2.75rem)] leading-[1.09] font-medium tracking-[-0.025em]">
              Selected Work. <span className="text-[#8e8e93] pointer-coarse:hidden">Scroll or Drag.</span>
              <span className="hidden text-[#8e8e93] pointer-coarse:inline">Swipe to Browse.</span>
            </h2>
          </Rise>
        </div>
      </ArcGallery>
    </main>
  );
}

/** The demo in its own colours, filling the frame. */
export default function Demo(props: Partial<typeof settings> = {}) {
  return (
    <div className="min-h-svh w-full" style={{ background: "#111111" }}>
      <DemoContent {...props} />
    </div>
  );
}

More by ReactHive

View all
  • Card Deal

    Card Deal

    19
  • Step Stack

    Step Stack

    16
  • Card Pack

    Card Pack

    11
  • Shoal

    Shoal

    7
  • Satin

    Satin

    6
  • Fluid Type

    Fluid Type

    5
  • Mercury Clock

    Mercury Clock

    3
  • Whirlwind

    Whirlwind

    2

More in Galleries

View all
  • Gallery Component

    Gallery Component

    36
  • Scattered About

    Scattered About

    63
  • Photo Deck

    Photo Deck

    64
  • Phantom Infinite Gallery

    Phantom Infinite Gallery

    79
  • Spiral Ribbon Gallery

    Spiral Ribbon Gallery

    30
  • Product Hover Showcase

    Product Hover Showcase

    106
  • Cloth Works Gallery

    Cloth Works Gallery

    53
  • Image Gallery

    Image Gallery

    131