{
  "registryVersion": 1,
  "id": "backgrounds/marble-run-background",
  "slug": "marble-run-background",
  "category": "backgrounds",
  "title": "Marble Run Background",
  "description": "A pastel marble run around the edges: matte marbles bounce down stairs, roll over a dome and a wave, circle a ring, and ride a glass lift back up, leaving the center free.",
  "tags": [
    "3d",
    "physics",
    "loop",
    "shape",
    "background"
  ],
  "useCases": [
    "Hero background for a workflow, automation, or project management product that promises a smooth flow",
    "Playful section for an edtech, kids learning, or toy brand",
    "Studio or agency landing section that wants a calm, tactile 3D backdrop"
  ],
  "placement": [
    "background",
    "hero"
  ],
  "style": [
    "playful",
    "glossy-3d",
    "minimal"
  ],
  "intensity": "subtle",
  "stack": {
    "framework": "react",
    "styling": "tailwindcss"
  },
  "dependencies": {
    "npm": {
      "gsap": "^3.13.0",
      "@gsap/react": "^2.1.0"
    },
    "gsapPlugins": [
      "MotionPathPlugin"
    ]
  },
  "variants": [],
  "version": "1.0.0",
  "updatedAt": "2026-10-11",
  "design": {
    "motion": "smooth",
    "pace": "moderate",
    "radius": "round",
    "scheme": "both",
    "palette": "multicolor",
    "hues": [
      "violet",
      "orange",
      "sky",
      "blue"
    ],
    "triggers": [
      "load",
      "hover",
      "click",
      "loop"
    ]
  },
  "adapt": {
    "colors": [
      {
        "hue": "violet",
        "classes": 0,
        "literals": 28
      },
      {
        "hue": "orange",
        "classes": 0,
        "literals": 2
      },
      {
        "hue": "sky",
        "classes": 0,
        "literals": 1
      },
      {
        "hue": "blue",
        "classes": 0,
        "literals": 1
      }
    ],
    "radiusClasses": [
      "rounded-3xl",
      "rounded-full"
    ],
    "eases": [
      "back",
      "bounce",
      "none",
      "power1"
    ],
    "durations": [
      0.3,
      4.2
    ]
  },
  "photoSlots": [],
  "sprinkles": [
    {
      "id": "sprinkle/shapes/matte-sphere@v2",
      "file": "sprinkles/v2/shapes/matte-sphere.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-sphere.webp",
      "description": "Sphere, peach (matte pastel 3D)."
    },
    {
      "id": "sprinkle/shapes/matte-stairs@v2",
      "file": "sprinkles/v2/shapes/matte-stairs.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-stairs.webp",
      "description": "Small block of three steps, lilac (matte pastel 3D).",
      "fixed": true
    },
    {
      "id": "sprinkle/shapes/matte-half-cylinder@v2",
      "file": "sprinkles/v2/shapes/matte-half-cylinder.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-half-cylinder.webp",
      "description": "Half cylinder lying on its flat side, lilac (matte pastel 3D).",
      "fixed": true
    },
    {
      "id": "sprinkle/shapes/matte-wave@v2",
      "file": "sprinkles/v2/shapes/matte-wave.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-wave.webp",
      "description": "Thick wavy slab, sky blue (matte pastel 3D).",
      "fixed": true
    },
    {
      "id": "sprinkle/shapes/matte-ring@v2",
      "file": "sprinkles/v2/shapes/matte-ring.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-ring.webp",
      "description": "Thick flat ring seen at an angle, cream (matte pastel 3D).",
      "fixed": true
    },
    {
      "id": "sprinkle/shapes/matte-quarter@v2",
      "file": "sprinkles/v2/shapes/matte-quarter.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-quarter.webp",
      "description": "Quarter-circle block, butter yellow (matte pastel 3D).",
      "fixed": true
    },
    {
      "id": "sprinkle/shapes/matte-cylinder@v2",
      "file": "sprinkles/v2/shapes/matte-cylinder.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-cylinder.webp",
      "description": "Upright cylinder, butter yellow (matte pastel 3D)."
    },
    {
      "id": "sprinkle/shapes/matte-cone@v2",
      "file": "sprinkles/v2/shapes/matte-cone.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-cone.webp",
      "description": "Cone, sky blue (matte pastel 3D)."
    },
    {
      "id": "sprinkle/shapes/matte-pyramid@v2",
      "file": "sprinkles/v2/shapes/matte-pyramid.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-pyramid.webp",
      "description": "Pyramid with soft edges, butter yellow (matte pastel 3D)."
    },
    {
      "id": "sprinkle/shapes/matte-twist@v2",
      "file": "sprinkles/v2/shapes/matte-twist.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/matte-twist.webp",
      "description": "Twisted bar, peach (matte pastel 3D)."
    }
  ],
  "page": "/snippets/backgrounds/marble-run-background",
  "preview": "/preview/backgrounds/marble-run-background",
  "registryPath": "/registry/snippets/backgrounds/marble-run-background.json",
  "install": "npm i gsap @gsap/react",
  "codeLines": 440,
  "readme": "# Marble Run Background\r\n\r\n`backgrounds/marble-run-background`\r\n\r\nA pastel marble run around the edges: matte marbles bounce down stairs, roll over a dome and a wave, circle a ring, and ride a glass lift back up, leaving the center free.\r\n\r\n## When to use\r\n\r\n- Hero background for a workflow, automation, or project management product that promises a smooth flow.\r\n- Playful section for an edtech, kids learning, or toy brand.\r\n- Studio or agency landing section that wants a calm, tactile 3D backdrop.\r\n\r\n## Install\r\n\r\n1. `npm i gsap @gsap/react`\r\n2. Copy the code with the **Copy** button on the snippet page and save it as a React component.\r\n3. Use it: `<MarbleRunBackground><YourHero /></MarbleRunBackground>`\r\n\r\n## Props\r\n\r\n| Prop | Type | Default | Description |\r\n| --- | --- | --- | --- |\r\n| `marbles` | `number` | `5` | Marbles looping on the track. Their timing is spread so one is always circling the ring. |\r\n| `pace` | `number` | `1` | Multiplies the duration of every part of the run; raise it for a calmer loop. |\r\n| `autoPlay` | `boolean` | `false` | Idle demo: drops a new marble every few seconds until the pointer, a touch, or focus arrives. For previews and thumbnails. |\r\n| `children` | `ReactNode` | sample hero | Your content, shown over the run. |\r\n| `className` | `string` | `\"\"` | Extra classes for the panel (change `h-[420px]` here). |\r\n\r\nClicking the panel (outside your buttons and links) drops a new marble at that spot: it bounces on the floor rail, rolls into the lift, and joins the loop (up to 4 extra marbles).\r\n\r\n## Photos\r\n\r\nNo photos. Every image is a sprinkle you can use directly from its public URL:\r\n\r\n- `sprinkle/shapes/matte-sphere@v2` (the marbles, tinted with `hue-rotate`)\r\n- `sprinkle/shapes/matte-stairs@v2`\r\n- `sprinkle/shapes/matte-half-cylinder@v2`\r\n- `sprinkle/shapes/matte-wave@v2`\r\n- `sprinkle/shapes/matte-ring@v2`\r\n- `sprinkle/shapes/matte-quarter@v2`\r\n- `sprinkle/shapes/matte-cylinder@v2` (lift base)\r\n- `sprinkle/shapes/matte-cone@v2` (lift cap)\r\n- `sprinkle/shapes/matte-pyramid@v2`\r\n- `sprinkle/shapes/matte-twist@v2`\r\n\r\n## Customization\r\n\r\n- The track is laid out from the panel size in `layout()`: each piece sits a bit lower than the one before, so marbles always roll downhill. The stairs, dome, ramp, wave, and ring are fixed because the marble path follows their measured outlines (`WAVE_TOP`, `DOME_RIDGE`, `RAMP_CURVE`).\r\n- Change the marble colors in `MARBLE_HUES`.\r\n- With reduced motion the run is still, with marbles resting at different spots on the track.\r\n",
  "sourceDir": "snippets/backgrounds/marble-run-background",
  "thumbnail": "/registry/thumbnails/backgrounds/marble-run-background.webp",
  "thumbnailDark": "/registry/thumbnails/backgrounds/marble-run-background.dark.webp",
  "codeAccess": "The code is not in this file. Get it with the MCP tool get_snippet and an InWebAsset API key (header Authorization: Bearer aw_...; sign in at /agents to create one), or with the Copy button on the snippet page after signing in. Free accounts can take snippet code 5 times per day (every fetch counts, also of a snippet fetched before); Pro accounts have no limit."
}
