Skip to content
About

The Table of Contents Knows Where You Are

The right-side table of contents on longer posts now highlights which section you're reading as you scroll.

1 min readEvergreen6:23amMiami Beach, FL, USA
On this page

Longer posts have a table of contents on the right side of the page. It's always been there, but it was dumb — just a list of links with no idea where you actually were in the article.

Now it knows.

What happened

As you scroll through a post, the table of contents tracks which heading is in view. The matching link turns red. If the list is long enough, the table of contents also scrolls itself to keep the active item visible — so you never lose track of where you are in a long nav list.

On mobile, the table of contents collapses into a tap-to-expand menu. That version tracks your position too.

If you have the "reduce motion" setting on your device, the animations and smooth scrolling turn off automatically.

Why

Reading a long post and not knowing where you are is a bit disorienting. The table of contents should work like a progress tracker, not just a shortcut panel.


PR: https://github.com/StevieIsmagic/vercel_blog/pull/16

Related posts

Stay in the loop

Newsletter launching soon — follow along via RSS.