{
  "id": "newtons-cradle-loader",
  "name": "Newton's Cradle Loader",
  "category": "loaders",
  "tags": [
    "pendulum",
    "swing",
    "physics",
    "balls",
    "desk toy"
  ],
  "description": "A Newton's cradle where the outer balls swing out and knock the row in turn.",
  "url": "https://copy-css.com/snippets/newtons-cradle-loader",
  "markdown": "https://copy-css.com/snippets/newtons-cradle-loader.md",
  "html": "<div class=\"loader-cradle\" role=\"status\" aria-label=\"Loading\">\n  <span></span><span></span><span></span><span></span>\n</div>",
  "css": ".loader-cradle {\n  display: flex;\n  border-top: 2px solid #94a3b8;\n}\n\n.loader-cradle span {\n  position: relative;\n  width: 18px;\n  height: 56px;\n  transform-origin: 50% 0;\n}\n\n/* String */\n.loader-cradle span::before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  left: 50%;\n  width: 1px;\n  height: 40px;\n  background: #94a3b8;\n}\n\n/* Ball */\n.loader-cradle span::after {\n  content: \"\";\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  width: 18px;\n  height: 18px;\n  border-radius: 50%;\n  background: radial-gradient(circle at 35% 30%, #94a3b8, #334155 60%);\n}\n\n.loader-cradle span:first-child {\n  animation: loader-cradle-left 1.2s infinite;\n}\n\n.loader-cradle span:last-child {\n  animation: loader-cradle-right 1.2s infinite;\n}\n\n@keyframes loader-cradle-left {\n  0% { transform: rotate(0); animation-timing-function: ease-out; }\n  25% { transform: rotate(35deg); animation-timing-function: ease-in; }\n  50%, 100% { transform: rotate(0); }\n}\n\n@keyframes loader-cradle-right {\n  0%, 50% { transform: rotate(0); animation-timing-function: ease-out; }\n  75% { transform: rotate(-35deg); animation-timing-function: ease-in; }\n  100% { transform: rotate(0); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .loader-cradle span:first-child,\n  .loader-cradle span:last-child { animation-duration: 3s; }\n}",
  "features": [
    "keyframe animations",
    "transforms",
    "radial gradients",
    "Flexbox",
    "reduced-motion support"
  ],
  "customProperties": []
}
