Skip to content
Sign inJoin waitlist

Design — Goeboek Next.js

The look of this Next.js template comes from a small set of tokens: change one and nearly every page, component and state follows.

So you rarely need to touch a component. This guide covers the colours, the logo and icon, the fonts, the text styles, the spacing, the motion and the components.

Run npm run dev and open http://localhost:3000/style-guide. It shows the colours, the text styles, the icons, the logo, links and navigation, the buttons, the labels, titles and figures, the property cards, the listing filter with the agent card and “Load More”, the post and testimonial cards, the slideshow and the form, each with its name. When you want to know what a change will affect, look there.

The style guide page: the colours, the text styles, the icons and the buttons

src/design-system/theme.css:

@theme {
--color-ink: #000000; /* Black: titles, buttons, the header links */
--color-white: #ffffff; /* White: the page, the header */
--color-soft: #525252; /* Soft Black: body text, meta links, the footer links */
--color-grey: #8c8c8c; /* Grey: "Property Available", "Agent", the 404 number */
--color-silver: #b7b7b7; /* Light grey: text on the dark call-to-action photo */
--color-accent: #eb5939; /* Accent: labels, hovered links, the buttons' hover */
--color-line: #e8e8e8; /* Line: dividers and the sections' top border */
--color-snow: #fafafa; /* the footer's fill */
--color-danger: #ff2244; /* a form button that failed (fill at 15 %) */
}

Each name becomes a Tailwind class: bg-ink, text-soft, text-accent, border-line. The translucent blacks and whites are opacity steps written on the components: bg-ink/3 for the card and panel fills, ink/5 for the label chips and hairlines, ink/20 for the veil over the card photos, bg-ink/70 for the call to action’s veil, ink/80 for the slideshow arrows, white/60 for the cards’ type tag and white/80 for the agent’s name chip. Change --color-accent and the orange follows everywhere.

The site is light by design and has no dark theme. Keep text on its background at a contrast of 4.5 : 1 or more, or the site becomes hard to read.

The logo is the round mark beside the name in two lines (“Goeboek” / “properties”). It is not a picture of text, so you change the name and the mark separately, in logo in src/content/site.ts:

"logo": {
"mark": "/images/logo-mark.svg", // the round mark (a square image, shown as tall as the logo)
"first": "Goeboek", // the first line of the name
"second": "properties", // the second line
"label": "Goeboek" // what screen readers read for the link home
}

Logo in src/design-system/components/brand/Logo.tsx draws it as a link home in a box of 121 × 40 (91 × 30 in the phone header), with the name in Inter sized to the box; the footer and the post pages’ sidebar show the same logo. A longer name runs past the box: shorten it, or change the text-[13.17cqw] size and the box widths (w-[121px], w-[91px]) in Logo.tsx. To use a logo file of your own instead, replace the mark and the two lines with one <img> in Logo.tsx.

src/app/icon.png (192 × 192) is the icon in the browser tab and src/app/apple-icon.png (180 × 180) the one on a phone’s home screen. Both are the round mark of the logo, as in the original design’s favicon: replace them with your mark, keeping the names. They are named in metadata.icons in src/app/layout.tsx; change the sizes there if your files have other sizes.

The template loads its two fonts through next/font in src/app/layout.tsx: Plus Jakarta Sans for every heading and text, and Inter for the button and label styles, both variable fonts:

const jakarta = Plus_Jakarta_Sans({ variable: "--font-jakarta", subsets: ["latin"] });
const inter = Inter({ variable: "--font-inter-face", subsets: ["latin"] });

theme.css makes --font-jakarta the site font (font-sans) and --font-inter-face the font-inter class.

To use another Google font, import it by name from next/font/google and keep the variable name:

import { DM_Sans } from "next/font/google";
const jakarta = DM_Sans({ variable: "--font-jakarta", subsets: ["latin"] });

A font that isn’t variable needs its weights listed (weight: ["400", "500", "600"]). For a font you have licensed yourself, use next/font/local and point it at the files in src/app/fonts/. Next.js serves the fonts from your own domain either way, so there is no request to Google at runtime.

src/design-system/tokens/text.ts holds the sizes and line heights. The headings step down on laptops, tablets and phones; the text styles keep their size.

Style Size (phone / tablet / laptop / desktop) Used for
h1 38 / 48 / 64 / 72 at 1.1, medium The hero title
h2 32 / 34 / 38 / 44, medium Section titles, the listing pages’ titles
h3 28 / 30 / 34 / 36, medium The About titles, a property’s title, the hero card’s title
h4 26 / 28 / 30 / 32, medium The hero card’s figures, the filter’s heading, the property page’s block titles
h5 20 / 22 / 24 / 24, medium Card titles, the hero card’s price, the values, the success pages’ subtitle
h6 18 / 19 / 20 / 20, medium Footer headings, card prices, agent names, form groups
number 36 / 42 / 46 / 54, medium The hero’s facts, the page titles of Blog, About, Contact, Add property and the success pages
large 18 at 1.4 The hero’s lead, the listing pages’ text
body 16 at 1.4 Section texts, quotes, card excerpts
bodyStrong 16 at 1.4, semibold Emphasised text
small 14 at 1.4 Meta lines, names, dates, footer links
caption 12 at 1.4 “More Details”
nav 15, medium, upper case The header’s links and “Menu”
button Inter 14, upper case, 0.05 em apart Button labels
label Inter 12, upper case Label chips, the type tag, small buttons, ratings

Change the numbers in text.ts rather than in the components, and text stays consistent across the site. Use a style as className={text.h2} or combine: className={cn(text.body, "text-soft")}.

Four sizes, set in theme.css:

Width Tailwind prefix
Phone below 810 px (none)
Tablet 810–1199 px md:
Laptop 1200–1439 px lg:
Desktop 1440 px and up xl:

Sections are full width with side padding of 20 px on phones, 30 on tablets, 40 on laptops and 50 on desktops. From 1200 px the listing and property pages put their sidebar (375 px wide, 400 from 1440) beside the cards; below, it goes above the cards (the filter) or under the page (the property’s agent and tour form), past a line. Spacing is Tailwind classes on the components (gap-5, gap-[30px]); Tailwind’s scale is 4 px per step, so gap-5 is 20 px.

Every hover and state change uses one spring (stiffness 500, damping 60, about 0.7 s, no overshoot): in CSS as ease-spring duration-spring (theme.css), in Motion as spring. src/design-system/tokens/motion.ts holds the transitions and the speeds:

Token Values Used for
spring stiffness 500, damping 60 Every Motion element that sets no transition of its own (MotionProvider): the menu button’s lines turning into a cross, the phone filter opening
slideSpring stiffness 200, damping 40 Every slideshow step
slideInterval hero 8 s, testimonials 4 s, a hovered card’s photos 1.5 s How long each slide stays

The form button’s tween (0.2 s, ease-form) and the spinner (animate-turn, once a second) are in theme.css.

What moves, and where to change it:

Effect Where to change it
Home’s large property cards step every 8 seconds, with dots and, on hover, arrows Slideshow in src/design-system/components/media/Slideshow.tsx, used by src/components/sections/Hero.tsx
The hero’s testimonials step every 4 seconds the same slideshow
A hovered property card’s photo steps through the main photo and the next two, and the agent’s chip slides in PropertyCard in src/design-system/components/cards/
The square buttons flip from one colour to the other, and the labels of the pill buttons roll up a line, on hover FlipButton, RollLabel, PillButton
The phone filter opens and closes ListingFilter in src/design-system/components/patterns/
“Load More” shows the next cards and moves the focus to the first new one LoadMore
The phone menu opens under the header, and its button’s lines turn into a cross src/components/site/Header.tsx, the button in MenuButton

There are no page transitions and no scroll effects. A slideshow plays only while it is on screen.

With “reduce motion” switched on in the visitor’s system, the slideshows don’t play by themselves (the arrows and dots still work), and Motion skips its transform and size animations. Fades and colour changes stay. MotionProvider (wrapped around every page in src/app/layout.tsx) does this for Motion; the CSS animations check the setting with motion-reduce:.

Photos and cards have 8 px corners, the call to action’s photo 20 px, the filter, the sidebars’ panels, the form fields and “Load More” 4 px, and the pill buttons are round-ended. Cards and panels are framed by a 1 px hairline in Black 5 %, and sections are separated by a 1 px line in --color-line. There are no drop shadows.

src/design-system/components/ holds the logo, the buttons and links (PillButton, FlipButton, RollLabel, TextLink, ActionLink), the header’s links and menu button (NavLink, MenuButton), the section layout (Section, SectionTitle, Label), the rating and the hero’s facts (Rating, Stat), the cards (PropertyCard, PropertyFeature for the hero, PropertyMeta, AgentCard, PostCard, TestimonialCard), the slideshow, the listing filter, the list with “Load More”, the rich text and the forms (Form, FormField, RadioGroup, SubmitButton). Its README lists every component with its props. The sections that make up a page are one level up, in src/components/sections/, and are listed in Pages and sections.

The icons are Phosphor shapes stored as path data in src/design-system/components/icons/paths.ts, in the light weight unless noted: star (the ratings, the fill weight), map-pin, area, bed and bath (the cards), caret-down (the phone filter, regular), plus (the hero’s facts, bold), and the property page’s rows: house, floor, additional-space, furnishing, calendar, renovation, heating, air-condition, fireplace, elevator, ventilation, intercom, window, television and wifi. Icon.tsx draws one in the current text colour. To add an icon:

  1. Open the icon on phosphoricons.com and copy the SVG.

  2. Take the d="…" of its <path>.

  3. Add a line to iconPaths:

    "my-icon": "M128,24A104,104,0,1,0,…",

Then use <Icon name="my-icon" className="size-5" />. Paths use a 256 × 256 grid, which is what Phosphor exports.