Internal route links
Navigate between pages in the same Next.js application.
Next.js 16+ · Module
The Link component from next/link is the primary way to navigate between routes in a Next.js App Router application. It extends an HTML anchor with client-side navigation and route prefetching.
Import Link from next/link and provide the required href. Next.js renders an anchor-like component that keeps navigation inside the app, performs client-side transitions, and can prefetch the linked route and its data as links enter the viewport.
<Link href="/dashboard">Dashboard</Link>| Name | Type | Description |
|---|---|---|
href | String or Object | Destination path or URL; required. |
as | String or Object | Alternative displayed URL; optional. |
prefetch | boolean | Controls whether route data is prefetched; true by default, or false for hover-only prefetching. |
scroll | boolean | Controls scroll position behavior after navigation. |
onNavigate | function | Handler invoked during client-side navigation; receives an event with preventDefault(). |
A React component rendering an anchor-like link with client-side navigation and prefetching.
import Link from 'next/link'
export default function Page() {
return (
<nav aria-label="Main navigation">
<Link href="/dashboard">Dashboard</Link>
<Link href={{ pathname: '/search', query: { q: 'next' } }}>
Search
</Link>
</nav>
)
}This component renders internal links using path and object-form URLs; Next.js can navigate client-side and prefetch linked routes in production.
Navigate between pages in the same Next.js application.
Preload likely destinations for faster transitions in production.
Build navigation menus with accessible anchor semantics.
Pass dynamic paths or query parameters to routes.
useRouterusePathnameuseSearchParams