Next.js supports several ways to style an app: global CSS, CSS Modules for locally scoped class names, inline styles, and utility-first frameworks like Tailwind CSS. This module starts with the styling options and then walks through setting up Tailwind in a Next.js project.
The second half is about optimization. next/font self-hosts your Google or local fonts so there are no extra network requests and less layout shift, and next/image serves correctly sized, lazy-loaded images. Some of the font videos were recorded for earlier Next.js versions (the package was called @next/font then), but the ideas carry over directly.
Watch the lessons in order, then continue on to Route Handlers & Databases.
Shows how to style a Next.js app with CSS Modules, inline CSS, global CSS and Tailwind CSS.
Installs Tailwind in a Next.js project, configures PostCSS, sets up IDE autocomplete, explains Preflight, and refactors components with Tailwind classes.
Font optimization with next/font for both local and Google fonts, which are self-hosted automatically, plus how to use them with Tailwind.
Covers adding custom fonts with next/font and images with next/image, and how both are optimized.