One use case for the animated code thing is displaying it side by side with an ancompanying article, course or docs. That means keeping the article in sync with the code editor (and vice versa).
Today I explored having links that scrolls the editor to a specific line and highlights it. It worked out pretty well.
Here’s the code:
https://svelte.dev/repl/e97b5f612f964979b9396e1c5d158f2f?version=3.35.0