Skip to content
Sign inJoin waitlist

Design — Cerette 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, the fonts, the text styles, the spacing, the motion, the components and the icons.

Run npm run dev and open http://localhost:3000/style-guide. It shows the colours, the text styles, the motion tokens, the logo and the icons, the buttons and links, the menu button and the footer’s links, the section layout, the photos, the awards table, the cards, the quote and call-to-action bands, the patterns (the services switcher, the team picker, rich text, the loading spinner) and the form with its states, each with its name. When you want to know what a change will affect, look there.

The style guide page: the colours and text styles, then every component with its name

src/design-system/theme.css:

@theme {
--color-ink: #000000; /* headings and text, the black buttons, the footer, the Submit button */
--color-grey: #707070; /* paragraphs, leads and captions on the page colour, labels */
--color-line: #b4b4b4; /* dividers, the ruler's ticks, the fields' placeholders */
--color-brown: #c36036; /* the accent: the "Let's talk" button, the current link, hovers, icons, the logo's mark */
--color-page: #f5f1e5; /* the page and the header once it is not see-through */
--color-white: #ffffff; /* cards and panels, text on photos and on black */
--color-field: rgb(187 187 187 / 0.25); /* the form fields' fill (white while focused) */
--color-icon: #999999; /* the select's chevron */
--color-error: #ff2244; /* the Submit button's error label */
--color-error-fill: rgb(255 34 68 / 0.15); /* the Submit button's fill after a failed send */
--color-spinner: #999999; /* the ring of the loading spinner under the blog list and the team cards */
}

Each name becomes a Tailwind class: bg-ink, text-grey, bg-brown. Swap the values for your own palette and the site changes. The template is black and grey on a warm cream page with brown for actions; keep text on its background at 4.5 : 1 or more, or the site becomes hard to read. White text sits on the brown buttons: if your accent is light, the buttons’ labels need a dark colour (Button in src/design-system/components/actions/Button.tsx).

Faded colours are opacity modifiers: ink/50 (the veil over the hero, the covers, the quote and the call to action), line/50 (the lines between the award rows) and ink/40 (a select’s disabled placeholder option). They follow Ink and Line when you change them.

A few colours sit outside the tokens, because Motion animates them and can’t read a CSS variable, so change them too when you change a colour:

Colour Where
The header’s background, written as the page colour (or white while the phone menu is open) with its opacity src/components/site/Header.tsx (rgba(245, 241, 229, …))
The brown hover of the simple text buttons, the project and service cards’ titles and the footer links’ dot src/design-system/components/actions/Button.tsx, cards/ProjectCard.tsx, cards/ServiceCard.tsx, navigation/FooterLink.tsx
The services switcher’s grey, black and brown titles and its phone accordion src/design-system/components/patterns/ServicesSwitcher.tsx
The browser icon: black and brown, white in a dark browser theme public/icon.svg, src/app/apple-icon.png
The swatches of the style guide repeat the values as text src/app/style-guide/tokens.ts

The “Cerette” wordmark is drawn as SVG paths in src/design-system/components/brand/Logo.tsx: the letters in the current text colour (white in the header over the Home video, a project’s cover and the 404 photo, black once the header turns the page colour, white in the footer) and the mark over the C always brown (fill-brown). To use your own:

  • As an SVG: replace the <path> elements with your logo’s, and set viewBox="0 0 110 25" to your artwork’s size. Give the parts that should keep their colour a fill class of their own, as the brown mark does.
  • As an image file: replace the <svg> with an <Image> of your file (it then keeps its own colours, also over the dark covers).

Each place sets the logo’s size with className: 79 × 18 on phones and 110 × 25 from tablets up in the header (src/components/site/Header.tsx), 88 × 20 in the footer (src/components/site/Footer.tsx). Change both numbers for artwork of other proportions. The logo links are named for screen readers by site.name (src/content/site.ts). The browser icons are described in Editing the content.

The template loads three Google fonts once, through next/font in src/app/layout.tsx:

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

theme.css maps them to three Tailwind fonts: Plus Jakarta Sans is the site font (font-sans: every text style, at -3 % letter spacing), Marcellus the quotes (font-quote: the founder’s quote), Inter the form fields and the Submit button’s “Thank you” and error labels (font-field). Plus Jakarta Sans and Inter are variable fonts, every weight in one file; the text styles use 500 and 600, the bold words of rich text 700.

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: ["500", "600", "700"]), and one with a real italic can load it with style: ["normal", "italic"]. 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, line heights and weights of the 14 text styles:

Style Phone Tablet (md:) Desktop (lg:) Weight Used for
display 50 100 120 600 The inner pages’ big titles (“Studio.”, “Articles.”)
h1 40 48 56 600 The Home hero’s title, a project’s, service’s, post’s and legal page’s title, the 404 title, the team’s names on desktops
h2 30 36 42 600 Section titles
h3 28 32 36 600 Headings in posts and legal pages, a project’s overview, “About service”
h4 24 26 28 600 About’s statement, the services’ names on Home
h5 20 22 24 600 A project’s result, the units beside the numbers
h6 18 19 20 600 Card titles
number 52 62 94 600 The numbers of Home and About
big 18 18 18 500 Leads, the testimonials’ quotes
paragraph 16 16 16 500 Body text, the text of posts and legal pages
small 14 14 14 500 Card text, the footer
menu 12 12 12 600 Upper case: the header’s links, button labels, the labels before section titles
tiny 12 12 12 500 Captions, the clients’ roles
quote 20 19 24 400 The founder’s quote (Marcellus)

Headings have a line height of 1.2, paragraphs 1.4, the display style 1.1 and the numbers 1. 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.h6, "text-white")}. The design system’s README lists where each is used.

Three sizes, set in theme.css:

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

Content is centred and stops at 1440 px. The side padding is 15 px on phones, 20 px on tablets and 30 px on desktops, and most sections have 60 / 80 / 100 px above and below (sectionGutters and sectionPadding in src/design-system/components/layout/Section.tsx; sectionGap sets the space between a section’s blocks). The header is fixed at the top, 58 px tall on phones and 83 px from tablets up; inner pages start their first section with the same space (pageTitleSpace in src/components/sections/PageTitle.tsx) (Pages and sections). A thin ruler with ticks separates some sections (RulerRow).

src/design-system/tokens/motion.ts holds the transitions and timings:

Token Values Used for
tweenAppear (T1) 1 s, overshoots about 2 % and settles Blocks rising into view, the word-by-word titles, the lines of the leads
heroRise (E6, E4) 0.6 s and 0.4 s after 0.2 s, from 50 px low The Home hero’s label and buttons
charAppear (TX) each character 0.05 s after the one before, out of a 10 px blur The Home hero’s title and text
titleWords (TW), introLines (TL) 0.05 s per word or line The titles and leads of About and Projects
spring (S0) no bounce, 0.4 s The buttons’ rolling labels and dots, the header’s colour, the phone menu, the post cards’ zoom
springSoft (S2) bounce 0.2, 0.4 s The menu button’s X, the accordion’s plus and minus, the services’ titles, the team picker
tweenIn (TI) 0.4 s, ease in The project and service cards’ hover
appearOffset, appearStagger 18 px, 0.1 s How far a block rises; the delay between the numbers and between the award photos
cardZoom 1.05 The card photos sit slightly enlarged and settle on hover

theme.css holds the same curves for CSS (--ease-t1, --ease-ti, --ease-e, --ease-s0, --ease-s2, --ease-form) and the animations that start before the page’s scripts load: the hero’s label and buttons and the blocks under the titles of About and Projects (animate-hero-label, animate-hero-buttons, animate-load-rise). MotionProvider (wrapped around every page in src/app/layout.tsx) makes spring the default of every Motion element that sets no transition of its own.

Effect Where to change it
Blocks rise into view as you scroll <Appear> (src/design-system/components/motion/Appear.tsx); appearOffset for the distance
The hero’s title and text appear letter by letter <CharAppear> in src/components/sections/HomeHero.tsx
The titles of About and Projects appear word by word, their leads line by line <WordAppear> and <LineRise>, through PageTitle (animate)
The services on Home switch one at a time src/design-system/components/patterns/ServicesSwitcher.tsx
The team on About: a picker on desktops, cards that load as you scroll below src/design-system/components/patterns/TeamPicker.tsx, src/components/sections/AboutTeam.tsx
Blog loads a page of posts at a time pageSize in src/content/pages/blog.ts
A section stands still its still prop (<QuoteSection still />)

The pages of a project, a service, a post, a legal page, Services, Blog, Contact and the 404 have no scroll effects: everything there is still but the hovers. There is no page transition, no parallax and no custom cursor.

With “reduce motion” switched on in the visitor’s system, movement is left out: titles and blocks fade in without rising or blurring, and transforms and layout animations are skipped. Fades and colour changes stay, and the hero’s video still plays. MotionProvider makes Motion skip its transform and layout animations, and the CSS animations have a fade-only version (motion-reduce:).

There are no rounded corners: photos, cards, buttons and fields are square; only the dots, the label’s ring, the avatars and the phone accordion’s circle are round. There are no drop shadows. Spacing is Tailwind classes on the components (gap-5, p-5, gap-[50px]). Tailwind’s scale is 4 px per step, so gap-5 is 20 px. Change them where you see them; the style guide shows the result immediately.

src/design-system/components/ holds the buttons and links, the logo and the icons, the scroll and load animations, the cards (project, service, post, testimonial, team, value), the menu button and the footer’s links, the photo with its grain, the awards table, the quote and call-to-action bands, rich text, the services switcher, the team picker, the spinner, the section layout and the form parts. Its README lists every component with its props and where it is used. 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: arrow-up-right and arrow-right (buttons, the cards’ “View Project” and “View Details”), star (ratings), the six light icons of “Why Cerette” (blueprint, crane-tower, users, kanban, windmill, lightbulb-filament), and arrow-up and check, which no page draws at the moment. <Icon name="star" /> draws one in the current text colour. To add one:

  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. A reason of “Why Cerette” names its icon in the copy (icon: "blueprint" in home.ts), so a new icon can go there too. If you keep the style guide, add the new name to icons in src/app/style-guide/tokens.ts too: that list is exhaustive on purpose, so npm run build stops until you do.