Animated React backgrounds and shaders

Gravity tag pile

Tags fall, bounce, spin and pile up with real physics. Grab one and throw it, sweep the cursor through the pile, or click for a pop.

Backgrounds, drag, Motion

Install

npm i clsx motion tailwind-merge && curl -o components/gravity-tag-pile.tsx https://motion-brew.com/r/gravity-tag-pile.tsx

One self contained file for React and Tailwind CSS: gravity-tag-pile.tsx. Or ask your AI agent to add it through the MCP server.

Usage

import { GravityTagPile } from "@/components/gravity-tag-pile";

export default function Page() {
  return (
    <GravityTagPile
      theme="candy"
      entrance="sequence"
      tags={[
        "Branding",
        "Web design",
        { label: "Motion", href: "/motion" },
        { label: "Ana", image: "/ana.jpg", color: "#111", textColor: "#fff" },
      ]}
      className="h-[480px]"
    />
  );
}

Props

PropTypeDefaultDescription
tags(string \{ label; color?; textColor?; image?; href? })[]design skillsTags, as labels or objects
theme"studio" \"pastel" \"candy" \"mono" \"earth""studio"Solid tag palette
pattern"none" \"dots" \"grid""none"Background pattern
entrance"random" \"sequence" \"together""random"How tags arrive
gravitynumber2200Downward pull, px/s²
bouncenumber0.3Bounciness, 0 to 1
frictionnumber0.6Grip, 0 to 1
throwStrengthnumber1Speed kept on release
squashnumber0.6Squash on impact, 0 to 1
cursorPushbooleantrueCursor nudges tags it brushes
borderbooleantrueHairline border on each tag
shadowbooleantrueDrop shadow under each tag
imageSizenumber26Image size, px
titlestringOptional heading behind the pile
descriptionstringOptional line under the heading
titleClassNamestringHeading typography
descriptionClassNamestringDescription typography
tagClassNamestringClasses for every tag (padding, font, size)
showResetbooleanfalseShow a drop-again button in the corner
onTagClick(tag, index) => voidCalled on click, not on drag
classNamestringSize and shape of the box

More backgrounds

  • Prism flow: A dark background crossed by a soft band of light that bends and drifts, its edges splitting into colour like light through a prism.
  • Spatial gallery: A WebGL media tunnel of images and videos that never ends: scroll or drag to travel, and the ring twists into a turning spiral as you go.
  • Pixel blast: A background of dithered pixel clouds that drift, shimmer and light up under the cursor.
  • Contour lines: A background of live topographic lines that bend around the cursor.

All animated react backgrounds and shaders