{
  "registryVersion": 1,
  "id": "backgrounds/kaleidoscope-background",
  "slug": "kaleidoscope-background",
  "category": "backgrounds",
  "title": "Kaleidoscope Background",
  "description": "A canvas kaleidoscope: star and burst beads in one slice are mirrored twelve times around a calm center; drag to turn the tube and the beads tumble into a new pattern.",
  "tags": [
    "shape",
    "star",
    "drag",
    "background",
    "loop"
  ],
  "useCases": [
    "Hero background for a festival, concert, or summer event ticket page",
    "Bold backdrop for a kids' brand, toy shop, or creative workshop landing page",
    "Portfolio or campaign intro that invites visitors to play before they scroll"
  ],
  "placement": [
    "background",
    "hero"
  ],
  "style": [
    "bold",
    "playful"
  ],
  "intensity": "bold",
  "stack": {
    "framework": "react",
    "styling": "tailwindcss"
  },
  "dependencies": {
    "npm": {
      "gsap": "^3.13.0",
      "@gsap/react": "^2.1.0"
    },
    "gsapPlugins": [
      "Draggable",
      "InertiaPlugin"
    ]
  },
  "variants": [],
  "version": "1.0.0",
  "updatedAt": "2026-10-11",
  "design": {
    "motion": "springy",
    "pace": "moderate",
    "radius": "round",
    "scheme": "both",
    "palette": "multicolor",
    "hues": [
      "violet",
      "amber",
      "pink",
      "yellow",
      "sky",
      "orange"
    ],
    "triggers": [
      "load",
      "hover",
      "click",
      "drag",
      "loop"
    ]
  },
  "adapt": {
    "colors": [
      {
        "hue": "violet",
        "classes": 0,
        "literals": 20
      },
      {
        "hue": "amber",
        "classes": 0,
        "literals": 8
      },
      {
        "hue": "pink",
        "classes": 0,
        "literals": 7
      },
      {
        "hue": "yellow",
        "classes": 0,
        "literals": 4
      },
      {
        "hue": "sky",
        "classes": 0,
        "literals": 2
      },
      {
        "hue": "orange",
        "classes": 0,
        "literals": 2
      }
    ],
    "radiusClasses": [
      "rounded-2xl",
      "rounded-3xl",
      "rounded-full"
    ],
    "eases": [
      "bounce",
      "power2",
      "power3"
    ],
    "durations": [
      0.7,
      5
    ]
  },
  "photoSlots": [],
  "sprinkles": [
    {
      "id": "sprinkle/shapes/burst-asterisk@v2",
      "file": "sprinkles/v2/shapes/burst-asterisk.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-asterisk.webp",
      "description": "Chunky six-arm asterisk with rounded ends, orange."
    },
    {
      "id": "sprinkle/shapes/burst-comic@v2",
      "file": "sprinkles/v2/shapes/burst-comic.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-comic.webp",
      "description": "Jagged comic explosion shape, orange with a sunny yellow center."
    },
    {
      "id": "sprinkle/shapes/burst-flower-star@v2",
      "file": "sprinkles/v2/shapes/burst-flower-star.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-flower-star.webp",
      "description": "Star with round petal-like tips, sky blue."
    },
    {
      "id": "sprinkle/shapes/burst-pinwheel@v2",
      "file": "sprinkles/v2/shapes/burst-pinwheel.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-pinwheel.webp",
      "description": "Four-blade pinwheel star, hot pink."
    },
    {
      "id": "sprinkle/shapes/burst-scallop@v2",
      "file": "sprinkles/v2/shapes/burst-scallop.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-scallop.webp",
      "description": "Scalloped badge with 16 round bumps, violet."
    },
    {
      "id": "sprinkle/shapes/burst-seal-12@v2",
      "file": "sprinkles/v2/shapes/burst-seal-12.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-seal-12.webp",
      "description": "Twelve-point starburst seal, sunny yellow."
    },
    {
      "id": "sprinkle/shapes/burst-seal-24@v2",
      "file": "sprinkles/v2/shapes/burst-seal-24.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-seal-24.webp",
      "description": "Starburst seal with 24 short spikes, hot pink, no text."
    },
    {
      "id": "sprinkle/shapes/burst-shooting@v2",
      "file": "sprinkles/v2/shapes/burst-shooting.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-shooting.webp",
      "description": "Five-point star with three straight trail lines behind it, sky blue."
    },
    {
      "id": "sprinkle/shapes/burst-sparkle-long@v2",
      "file": "sprinkles/v2/shapes/burst-sparkle-long.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-sparkle-long.webp",
      "description": "Four-point sparkle with long thin rays, white."
    },
    {
      "id": "sprinkle/shapes/burst-star-5@v2",
      "file": "sprinkles/v2/shapes/burst-star-5.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-star-5.webp",
      "description": "Classic five-point star, sunny yellow."
    },
    {
      "id": "sprinkle/shapes/burst-star-6@v2",
      "file": "sprinkles/v2/shapes/burst-star-6.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-star-6.webp",
      "description": "Six-point star, sky blue."
    },
    {
      "id": "sprinkle/shapes/burst-star-8@v2",
      "file": "sprinkles/v2/shapes/burst-star-8.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-star-8.webp",
      "description": "Eight-point star, hot pink."
    },
    {
      "id": "sprinkle/shapes/burst-star-rounded@v2",
      "file": "sprinkles/v2/shapes/burst-star-rounded.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-star-rounded.webp",
      "description": "Five-point star with soft rounded tips, orange."
    },
    {
      "id": "sprinkle/shapes/burst-sun@v2",
      "file": "sprinkles/v2/shapes/burst-sun.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-sun.webp",
      "description": "Circle with twelve triangular rays, sunny yellow."
    },
    {
      "id": "sprinkle/shapes/burst-twinkle-pair@v2",
      "file": "sprinkles/v2/shapes/burst-twinkle-pair.webp",
      "publicUrl": "https://inassetweb-cdn.inwebsite.online/sprinkles/v2/shapes/burst-twinkle-pair.webp",
      "description": "Large and a small four-point star side by side, violet."
    }
  ],
  "page": "/snippets/backgrounds/kaleidoscope-background",
  "preview": "/preview/backgrounds/kaleidoscope-background",
  "registryPath": "/registry/snippets/backgrounds/kaleidoscope-background.json",
  "install": "npm i gsap @gsap/react",
  "codeLines": 481,
  "readme": "# Kaleidoscope Background\r\n\r\n`backgrounds/kaleidoscope-background`\r\n\r\nA full-panel kaleidoscope drawn on canvas. Star and burst beads sit in one 30° slice, and the mirrors repeat that slice twelve times around the center, so every bead becomes a ring of twelve. The tube turns slowly and the beads drift a little, so the pattern never stands still. Drag or swipe sideways to turn the tube: every half turn of your hand, the beads tumble and land in a new arrangement with a small jolt. The middle stays calm for your headline.\r\n\r\n## When to use\r\n\r\n- Hero background for a festival, concert, or summer event.\r\n- Bold backdrop for a kids' brand, toy shop, or creative workshop.\r\n- Portfolio or campaign intro that invites visitors to play.\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 and put your own content inside:\r\n\r\n```tsx\r\n<KaleidoscopeBackground className=\"h-[600px] max-w-none rounded-none\">\r\n  <YourHero />\r\n</KaleidoscopeBackground>\r\n```\r\n\r\n## Props\r\n\r\n| Prop | Type | Default | Description |\r\n| --- | --- | --- | --- |\r\n| `beads` | `string[]` | 15 burst shapes | Bead images; each one is drawn twelve times by the mirrors. |\r\n| `speed` | `number` | `5` | Slow turn of the tube in degrees per second. |\r\n| `shuffleEvery` | `number` | `12` | Seconds between the beads tumbling on their own (`0` = only when turned or clicked). |\r\n| `autoPlay` | `boolean` | `false` | Idle demo for previews: a hand turns the tube every ~5 s so the beads tumble, until someone interacts. |\r\n| `children` | `ReactNode` | sample hero | Your content, centered over the calm core. |\r\n| `className` | `string` | `\"\"` | Extra classes for the wrapper (size, corners). |\r\n\r\n## Interaction\r\n\r\n- Drag or swipe sideways anywhere to turn the tube, with inertia. Vertical swipes still scroll the page on phones.\r\n- Click (without dragging) to shake the beads into a new pattern.\r\n- The **Shake** button does the same from the keyboard; Left/Right arrows on it turn the tube.\r\n- With `prefers-reduced-motion`, one still pattern is shown; Shake picks another.\r\n- Drawing pauses while the panel is off-screen.\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/burst-asterisk@v2`\r\n- `sprinkle/shapes/burst-comic@v2`\r\n- `sprinkle/shapes/burst-flower-star@v2`\r\n- `sprinkle/shapes/burst-pinwheel@v2`\r\n- `sprinkle/shapes/burst-scallop@v2`\r\n- `sprinkle/shapes/burst-seal-12@v2`\r\n- `sprinkle/shapes/burst-seal-24@v2`\r\n- `sprinkle/shapes/burst-shooting@v2`\r\n- `sprinkle/shapes/burst-sparkle-long@v2`\r\n- `sprinkle/shapes/burst-star-5@v2`\r\n- `sprinkle/shapes/burst-star-6@v2`\r\n- `sprinkle/shapes/burst-star-8@v2`\r\n- `sprinkle/shapes/burst-star-rounded@v2`\r\n- `sprinkle/shapes/burst-sun@v2`\r\n- `sprinkle/shapes/burst-twinkle-pair@v2`\r\n\r\n## Customization\r\n\r\n- `BEADS` sets how many beads live in the slice (30 by default, so about 360 pieces on screen).\r\n- The calm core is `r0` in `measure()` (beads stay outside it) plus the radial overlay above the canvas; widen both for a longer headline.\r\n- In dark mode each bead gets a faint halo of its own color; the probe element with `dark:block` tells the canvas which theme is on.\r\n- Drag sensitivity is the `0.35` degrees per pixel in `turned()`.\r\n",
  "sourceDir": "snippets/backgrounds/kaleidoscope-background",
  "thumbnail": "/registry/thumbnails/backgrounds/kaleidoscope-background.webp",
  "thumbnailDark": "/registry/thumbnails/backgrounds/kaleidoscope-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."
}
