Use code LAUNCH for $100 off (limited to next 10 customers).

DirectoryStack Logo Light Mode

Customizations

The boilerplate uses Inter as the default fonts for both, headings and regular text.

  1. Go to the layout.tsx file in the /app folder and change the following part to any other
// Part 1
import { Inter } from 'next/font/google';

// Part 2
const inter = Inter({
	variable: '--font-inter',
	subsets: ['latin'],
	display: 'swap',
});

// Part 3
<html lang="en" className={`${inter.variable}`}>

to e.g.

// Part 1
import { Space_Mono } from 'next/font/google'

// Part 2
const SpaceMono = Space_Mono({
  subsets: ['latin'],
  display: 'swap',
  variable: '--font-body',
})

// Part 3
<html lang="en" className={`${SpaceMono.variable}`}>

Example taken from v0.dev public themes:

  1. Follow the above tutorial but import 2 fonts
// Part 1
import { Bricolage_Grotesque } from 'next/font/google'
import { Space_Mono } from 'next/font/google'

// Part 2
const fontHeading = Bricolage_Grotesque({
  subsets: ['latin'],
  display: 'swap',
  variable: '--font-heading',
})

const fontBody = Space_Mono({
  subsets: ['latin'],
  display: 'swap',
  variable: '--font-body',
})

// Part 3

<html lang="en" className={`${fontHeading.variable,
          fontBody.variable}`}>

  1. Go to globals.css in your /app folder and add
@layer base {
	body {
		@apply font-body;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		@apply font-heading;
	}
}
  1. Go to tailwind.config.js and add (not replace)
import { fontFamily } from 'tailwindcss/defaultTheme';

export default {
	theme: {
		extend: {
			fontFamily: {
				heading: ['var(--font-heading)', ...fontFamily.sans],
				body: ['var(--font-body)', ...fontFamily.mono],
			},
		},
	},
};

Interested in kickstarting your directory business?

Get the latest news, guides and changelog updates straight to your inbox.

By signing up, you agree to our Privacy Policy