I'm building a navbar, and the page title that is selected is underlined. However, I would really like to animate this as well, so that the underline moves between the page titles as you select them.
I've been reading up on svelte animations, and I guess this would be simple if I define the underline as a separate component. I would prefer to have it as a css property on the title component though, as this creates a more logical coupling.
It seems like a regular fade in and out would be easy, but I wonder if it's possible to make the underline actually move between the titles?
I hope my explanation was clear - thank you