shuding/next-view-transitions
shuding/next-view-transitions has 2,381 GitHub stars and 93 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-11 10:28 UTC. Last push 2026-03-06.
Use CSS View Transitions API in Next.js App Router.
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalnext-view-transitions
Use View Transitions API in Next.js App Router.
Demo.
Disclaimer
This library is aimed at basic use cases of View Transitions and Next.js App Router. With more complex applications and use cases like concurrent rendering, Suspense and streaming, new primitives and APIs still need to be developed into the core of React and Next.js in the future (more).
Installation
Use your favorite package manager to install the next-view-transitions package. For example:
pnpm install next-view-transitions
Usage
Wrap your content with the <ViewTransitions> component inside the layout file:
import { ViewTransitions } from 'next-view-transitions'
export default function Layout({ children }) {
return (
<ViewTransitions>
<html lang='en'>
<body>
{children}
</body>
</html>
</ViewTransitions>
)
}
Then, use the <Link> component for links that need to trigger a view transition:
import { Link } from 'next-view-transitions'
export default function Component() {
return (
<div>
<Link href='/about'>Go to /about</Link>
</div>
)
}
Or use the useTransitionRouter hook for programmatic navigation:
import { useTransitionRouter } from 'next-view-transitions'
export default function Component() {
const router = useTransitionRouter()
return (
<div>
<button onClick={() => {
// All Next.js router methods are supported
router.push('/about')
}}>Go to /about</button>
</div>
)
}
That's it!
License
MIT.
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,998 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,607 starsreact/react
The library for web and native user interfaces.
252,523 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,534 stars