JSFiddle - React, Tailwind, and code Playground

HTML

<svg width="200" height="500">
    <rect fill="blue" width="100" height="100">
      <animate id="curtainsOpen" attributeName="x" from="0" to="100" dur="1s"/>
    </rect>
    <rect fill="red" y="120" width="100" height="100">
      <animate id="penguinA" begin="curtainsOpen.end" attributeName="x" from="0" to="100" dur="1.5s"/>
    </rect>
    <rect fill="green" y="240" width="100" height="100">
      <animate id="penguinB" begin="curtainsOpen.end" attributeName="x" from="0" to="100" dur="1s"/>
    </rect>
    <animate id="spacer" begin="penguinA.end; penguinB.end" end="penguinA.end-0.001s; penguinB.end-0.001s" restart="never"/>
    <rect fill="yellow" y="360" width="100" height="100">
      <animate attributeName="x" begin="spacer.end" from="0" to="100" dur="1s"/>
    </rect>
</svg>