Link and semantic navigation
Use next/link to navigate between pages of an App Router application. It renders a link and integrates with framework navigation. A native anchor remains appropriate for external sites or downloads; a button represents an action instead of a destination.
Scope: Next.js 16.x candidate, App Router only, Cache Components disabled, TypeScript unless otherwise labeled. Examples are static source walkthroughs; exact framework patch and build are not verified.
app/page.tsx
import Link from 'next/link';export default function Home() { return <main> <h1>River Books</h1> <p><Link href="/catalog">Browse the book catalog</Link></p> <p><Link href="/help">Read ordering help</Link></p> </main>;}The user sees two meaningful, keyboard-focusable links. Each href is a known local route; the URL changes when followed.
Links describe destinations
Link accepts an href string or a URL object. For a known catalog path with a filter, the object form separates the pathname from the query fields. Query encoding is handled by the URL construction; avoid concatenating arbitrary user input into a destination. An ordinary anchor is useful for external documents. Preserve visible focus and avoid nesting an interactive button inside a link.
A filtered catalog link (partial JSX)
<Link href={{ pathname: '/catalog', query: { sort: 'title' } }}> Browse books by title</Link>Expected destination: /catalog?sort=title. Filtering itself is implemented later; a URL does not automatically implement business logic.
Common mistake
Do not use a clickable div or a router call for every navigation. Native links support familiar keyboard, open-in-new-tab and browser behavior.
Try it yourself
Add a link to /catalog/moss using a label that names the book. Explain why a button labeled Add to reading list should be a button instead.
After this lesson, you should be able to: Choose Link or an ordinary anchor; Build a meaningful link label.
Further reading: Link destination, replace, prefetch.