Active Link css transition flickering
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Router
Describe the bug
When styling the active link with a color transition, the previously active link is occasionally styled incorrectly. It briefly flickers with the previous colors for less than a second. This happens rarely (maybe 1 in 30 navigations). I’m not sure whether the bug is caused by the tanstack router or by CSS itself.
Your Example Website or App
https://github.com/idonotknowwhoiam/tanstackrouter-repro
Steps to Reproduce the Bug or Issue
- Clone the repository.
- Start the server (dev/preview).
- Navigate between pages, occasionally refreshing the browser (this may or may not influence the issue idk).
Expected behavior
The active link should switch styles without any flickering.
Screenshots or Videos
https://github.com/user-attachments/assets/f503d530-4646-41ba-a5c4-18850d70a4f7
Platform
- Router / Start Version: 1.139.12
- OS: macOS
- Browser: Chrome, Arc
- Browser Version: 142.0.7444.177
- Bundler: Vite
- Bundler Version: 7.1.7
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by cloning the linked tanstackrouter-repro application and reproduce the intermittent flicker while navigating between pages in the listed browsers. Trace the router's active-link styling behavior alongside the CSS transition; done means identifying whether the router or CSS causes the flicker and preventing it during navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, typescript, vite
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100