Glorious Demo is an open source javascript library that exposes an easy API to create animations for your code samples. Projects like https://nodecron.com/ are already using it.
Show off code beyond Glorious Demo. Try Theatre.js for timeline control and 3D scenes, or p5.js for playful, accessible sketches. For particles, Particular Drift shines. Need instant snippets? CodeMotion.dev animates in one click.