Skip to main content

Get Started

Install Next.js and create your first application in minutes.

App Router

Learn the modern App Router with React Server Components, layouts, and streaming.

API Reference

Explore the full API including components, functions, and configuration options.

Pages Router

Use the stable Pages Router with getStaticProps, getServerSideProps, and more.

What is Next.js?

Next.js is a React framework that gives you the building blocks to create full-stack web applications. It extends React with:
  • File-based routing — Create routes by adding files to your app/ or pages/ directory
  • Server Components — Render components on the server to reduce client-side JavaScript
  • Streaming — Progressively render UI from the server with React Suspense
  • Built-in optimizations — Automatic image, font, and script optimization
  • Turbopack — Rust-based bundler for fast development builds
  • Full-stack — Route Handlers let you build API endpoints alongside your UI

Choose your router

Key features

Routing

File-based routing with layouts, dynamic segments, and parallel routes.

Data Fetching

Fetch data on the server or client with async/await and React cache.

Caching

Multiple caching layers for fast page loads and reduced API calls.

Images

Automatic image optimization with lazy loading and modern formats.

Fonts

Zero layout shift font loading with Google Fonts and local fonts.

TypeScript

First-class TypeScript support with automatic type checking.

Architecture overview

Turbopack

Next.js ships with Turbopack, a Rust-based bundler that delivers fast incremental builds.

React Server Components

Render components on the server for better performance and smaller client bundles.

Edge Runtime

Deploy to edge networks for low-latency responses worldwide.

Compiler

SWC-based compiler for fast transforms, minification, and dead code elimination.

Community

GitHub Discussions

Ask questions and share ideas with the Next.js community.

Contributing

Learn how to contribute to Next.js and submit your first PR.

Build docs developers (and LLMs) love