{
  "registryVersion": 1,
  "id": "backgrounds/floating-3d-shapes",
  "slug": "floating-3d-shapes",
  "category": "backgrounds",
  "title": "Floating 3D Shapes",
  "description": "A zero-gravity backdrop of glossy 3D shapes in three depth layers with depth-of-field blur; they bob, tilt, and lean with the pointer, or drift on their own.",
  "tags": [
    "background",
    "3d",
    "parallax",
    "cursor",
    "loop",
    "decoration"
  ],
  "useCases": [
    "Hero background for a design tool, creative app, or 3D asset kit",
    "Playful launch or announcement banner",
    "Backdrop for a sign-up form or CTA section that needs depth"
  ],
  "placement": [
    "background",
    "hero"
  ],
  "style": [
    "glossy-3d",
    "playful"
  ],
  "intensity": "medium",
  "stack": {
    "framework": "react",
    "styling": "tailwindcss"
  },
  "dependencies": {
    "npm": {
      "gsap": "^3.13.0",
      "@gsap/react": "^2.1.0"
    },
    "gsapPlugins": []
  },
  "variants": [],
  "version": "1.0.3",
  "updatedAt": "2026-10-07",
  "design": {
    "motion": "smooth",
    "pace": "moderate",
    "radius": "round",
    "scheme": "both",
    "palette": "multicolor",
    "hues": [
      "violet",
      "orange",
      "fuchsia",
      "blue",
      "red"
    ],
    "triggers": [
      "load",
      "hover",
      "loop"
    ]
  },
  "adapt": {
    "colors": [
      {
        "hue": "violet",
        "classes": 8,
        "literals": 8
      },
      {
        "hue": "orange",
        "classes": 2,
        "literals": 1
      },
      {
        "hue": "fuchsia",
        "classes": 2,
        "literals": 0
      },
      {
        "hue": "blue",
        "classes": 0,
        "literals": 2
      },
      {
        "hue": "red",
        "classes": 0,
        "literals": 1
      }
    ],
    "radiusClasses": [
      "rounded-3xl",
      "rounded-full"
    ],
    "eases": [
      "back",
      "none",
      "power3",
      "sine"
    ],
    "durations": [
      0.9,
      16
    ]
  },
  "photoSlots": [],
  "sprinkles": [
    {
      "id": "sprinkle/objects-3d/knot@v2",
      "file": "sprinkles/v2/objects-3d/knot.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/knot.webp",
      "description": "3D torus knot, violet to coral."
    },
    {
      "id": "sprinkle/objects-3d/torus@v2",
      "file": "sprinkles/v2/objects-3d/torus.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/torus.webp",
      "description": "Glossy 3D torus (donut), coral."
    },
    {
      "id": "sprinkle/objects-3d/coil@v2",
      "file": "sprinkles/v2/objects-3d/coil.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/coil.webp",
      "description": "3D spiral spring, amber."
    },
    {
      "id": "sprinkle/objects-3d/cone@v2",
      "file": "sprinkles/v2/objects-3d/cone.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/cone.webp",
      "description": "3D cone, sky blue."
    },
    {
      "id": "sprinkle/objects-3d/arch@v2",
      "file": "sprinkles/v2/objects-3d/arch.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/arch.webp",
      "description": "3D arch, sky blue."
    },
    {
      "id": "sprinkle/objects-3d/half-sphere@v2",
      "file": "sprinkles/v2/objects-3d/half-sphere.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/half-sphere.webp",
      "description": "3D half sphere, amber."
    },
    {
      "id": "sprinkle/objects-3d/sphere@v2",
      "file": "sprinkles/v2/objects-3d/sphere.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/sphere.webp",
      "description": "Glossy 3D sphere, violet."
    },
    {
      "id": "sprinkle/objects-3d/pyramid@v2",
      "file": "sprinkles/v2/objects-3d/pyramid.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/pyramid.webp",
      "description": "3D pyramid, violet."
    },
    {
      "id": "sprinkle/objects-3d/ring@v2",
      "file": "sprinkles/v2/objects-3d/ring.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/ring.webp",
      "description": "Flat 3D ring, amber."
    },
    {
      "id": "sprinkle/objects-3d/blob@v2",
      "file": "sprinkles/v2/objects-3d/blob.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/blob.webp",
      "description": "Organic 3D blob, sky blue."
    },
    {
      "id": "sprinkle/objects-3d/cylinder@v2",
      "file": "sprinkles/v2/objects-3d/cylinder.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/objects-3d/cylinder.webp",
      "description": "3D cylinder, coral."
    }
  ],
  "page": "/snippets/backgrounds/floating-3d-shapes",
  "preview": "/preview/backgrounds/floating-3d-shapes",
  "registryPath": "/registry/snippets/backgrounds/floating-3d-shapes.json",
  "install": "npm i gsap @gsap/react",
  "codeLines": 255,
  "readme": "# Floating 3D Shapes\r\n\r\n`backgrounds/floating-3d-shapes`\r\n\r\nA zero-gravity backdrop of glossy 3D shapes in three depth layers with depth-of-field blur; they bob, tilt, and lean with the pointer, or drift on their own.\r\n\r\n## When to use\r\n\r\n- Hero background for a design tool, creative app, or 3D asset kit.\r\n- Playful launch or announcement banner.\r\n- Backdrop for a sign-up form or CTA section that needs depth.\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:\r\n\r\n```tsx\r\n<Floating3DShapes parallax={1.4} className=\"h-[600px] max-w-none rounded-none\">\r\n  <YourHero />\r\n</Floating3DShapes>\r\n```\r\n\r\n## Props\r\n\r\n| Prop | Type | Default | Description |\r\n| --- | --- | --- | --- |\r\n| `shapes` | `FloatingShape[]` | 11 glossy shapes | Each shape: `src`, `left` / `top` (center, percent of the panel), `size` (px on desktop, 62% on phones), `depth` (`\"far\"`, `\"mid\"`, `\"near\"`), optional `rotate`. |\r\n| `parallax` | `number` | `1` | Pointer parallax strength; `0` turns it off. |\r\n| `idleDrift` | `boolean` | `true` | While the pointer is away, a virtual pointer traces a slow figure eight so the scene keeps breathing. |\r\n| `children` | `ReactNode` | sample hero | Content shown between the mid and near layers. |\r\n| `className` | `string` | `\"\"` | Extra classes for the panel (it is `h-[420px] max-w-5xl rounded-3xl` by default). |\r\n\r\n## Photos\r\n\r\nNo photos. Every shape is a sprinkle you can use directly from its public URL:\r\n\r\n- `sprinkle/objects-3d/knot@v2`\r\n- `sprinkle/objects-3d/torus@v2`\r\n- `sprinkle/objects-3d/coil@v2`\r\n- `sprinkle/objects-3d/cone@v2`\r\n- `sprinkle/objects-3d/arch@v2`\r\n- `sprinkle/objects-3d/half-sphere@v2`\r\n- `sprinkle/objects-3d/sphere@v2`\r\n- `sprinkle/objects-3d/pyramid@v2`\r\n- `sprinkle/objects-3d/ring@v2`\r\n- `sprinkle/objects-3d/blob@v2`\r\n- `sprinkle/objects-3d/cylinder@v2`\r\n\r\n## Customization\r\n\r\n- The look of each layer (parallax, blur, opacity, drift distance, pace) lives in the `DEPTHS` table.\r\n- Near shapes render in front of the content, so keep them in the corners; far and mid shapes sit behind it.\r\n- Swap the shapes for others of the same family (glossy 3D) with the **Swap asset** button, or pass your own `shapes`.\r\n- The bob uses function-based values with `repeatRefresh: true`, so every cycle wanders to a new spot and tilt.\r\n- Users with `prefers-reduced-motion` see the shapes resting at their tilts with no parallax.\r\n",
  "sourceDir": "snippets/backgrounds/floating-3d-shapes",
  "thumbnail": "/registry/thumbnails/backgrounds/floating-3d-shapes.webp",
  "thumbnailDark": "/registry/thumbnails/backgrounds/floating-3d-shapes.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."
}
