Skip to content
masterclass Buddy

Next.js 16+ · Function

localFont

Use next/font/local to load and self-host local fonts in a Next.js App Router application. Apply the returned className to an element, often the root layout, to use the font.

Last updated

Syntax

localFont({ src: string | FontSource[] })

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • next/font
  • next/font/google
  • next/font/local
  • Font API Reference

Source: How to use fonts. Checked 2026-11-03.