ReactHive

Sticker Trail

Component 7

About

The pointer leaves a trail of stickers. Each one pops down where you passed, hangs a moment, then drops off the bottom, spinning. Move slowly for a neat line, fast to spray them, and click for a handful at once. While nobody's moving, it draws a loop of its own.

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

Code

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

Usage.tsx

"use client";

import { StickerTrail } from "@/components/ui/sticker-trail";

const settings = {
  size: 1,
  life: 1.1,
  density: 1,
  autopilot: true
};

/* The demo's Google Fonts. In a Next.js app, use next/font/google instead. */
if (typeof document !== "undefined" && !document.getElementById("sticker-trail-fonts")) {
  const style = document.createElement("style");
  style.id = "sticker-trail-fonts";
  style.textContent = "@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@100..900&display=swap'); .rh-inter-tight { font-family: 'Inter Tight', sans-serif; }";
  document.head.appendChild(style);
}

const type = { className: "rh-inter-tight", style: { fontFamily: "'Inter Tight', sans-serif" } };

function DemoContent(props: Partial<typeof settings> = {}) {
  const v = { ...settings, ...props };
  return (
    <main className={`${type.className} bg-[#111111] text-[#f2f2f2]`}>
      <style>{`
        @keyframes trail-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
        @media (prefers-reduced-motion: reduce) { .trail-in { animation: none !important; } }
      `}</style>
      <StickerTrail className="h-svh min-h-[36rem]" size={Number(v.size)} life={Number(v.life)} density={Number(v.density)} autopilot={Boolean(v.autopilot)}>
        <div className="flex h-full flex-col items-center justify-center px-6 text-center">
          <h1 className="trail-in text-[#efe5d3] text-[15vw] leading-[0.9] font-semibold tracking-[-0.05em] sm:text-[clamp(3.4rem,10vw,9rem)] animate-[trail-rise_0.9s_cubic-bezier(0.22,1,0.36,1)_both]">
            Follow
            <br />
            the Fun.
          </h1>
          <p className="trail-in mt-7 max-w-[22rem] text-[17px] leading-[25px] font-medium text-balance text-[#f2f2f2]/65 animate-[trail-rise_0.9s_cubic-bezier(0.22,1,0.36,1)_0.12s_both]">
            Move to leave a trail of stickers. Go fast to spray them, or click for a handful.
          </p>
          <a
            href="#"
            className="trail-in mt-8 animate-[trail-rise_0.9s_cubic-bezier(0.22,1,0.36,1)_0.24s_both] rounded-full bg-[#d4430c] px-7 py-3 text-[16px] font-semibold text-white transition-[background-color,scale] duration-500 ease-[cubic-bezier(0.19,1,0.22,1)] hover:bg-[#b9390a] active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f2f2f2]"
          >
            Get in Touch
          </a>
        </div>
      </StickerTrail>
    </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

    167
  • Arc Gallery

    Arc Gallery

    102
  • Step Stack

    Step Stack

    88
  • Fluid Type

    Fluid Type

    85
  • Card Pack

    Card Pack

    55
  • Iris Scroll

    Iris Scroll

    36
  • Satin

    Satin

    29
  • Colour Wash Slider

    Colour Wash Slider

    23

Explore more

Part of ReactHive UI — browse the full library on 21st.dev.