facebook / facebook/docusaurus

View Transition for page navigation

Open
#12,223 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
66.2k
Forks
10k
Avg merge
1d 3h
Merged PRs (30d)
52

Description

### Discussed in https://github.com/facebook/docusaurus/discussions/12217

Originally posted by **kenrick95** July 2, 2026
[View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) is a feature to enhance page navigation experience by having a animation plays when navigating from one route to another route. Having this page transition gives an overall better user experience so page navigation are not too 'harsh'. Of course, the best practice of turning off this when user prefers reduced motion should be respected too.

Example site having View Transitions: https://web.dev/

Browser support: [Baseline Newly Available](https://webstatus.dev/features/view-transitions) feature and further enhancement such as [Cross-Document View Transtion is in Interop 2026](https://web.dev/blog/interop-2026#view_transitions). So by end of 2026, I expect this to be widely available in major browsers.

At time of writing (v3.10), adding View Transition to Docusaurus is not straightfoward because of the need to calling `ReactDOM.flushSync` to get a snapshot of the next route. When inside [client module](https://docusaurus.io/docs/advanced/client#client-modules)'s `onRouteUpdate`, it is already too late to call as React is already in progress of rendering the next route. So I'm wondering if there's possibility to explore adding this view transition feature into Docusaurus core?

Thanks~

Contributor guide

Open the contributing guide

Research direction

Start with Docusaurus core routing and the client module's onRouteUpdate entry point, then examine how ReactDOM.flushSync relates to capturing the next-route snapshot. The goal is to determine whether core can support View Transitions during page navigation while respecting users who prefer reduced motion.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.