Design — Brickfolio 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.
See everything first
Section titled “See everything first”Run npm run dev and open http://localhost:3000/style-guide. It shows the colours, the text styles, the icons, the
buttons and links, the stars and social links, the cards, the article header and rich text, the tickers, the question
list and the forms, each with its name. When you want to know what a change will affect, look there.

Colours
Section titled “Colours”src/design-system/theme.css:
@theme { --color-ink: #050505; /* the page, the header, dark labels */ --color-light: #e4e4e4; /* titles, names, labels, the nav links, the load-more buttons' fill */ --color-grey: #8d8d8d; /* the rotating roles, testimonial roles, "Contact Me" */ --color-accent: #fc5000; /* orange: the pill buttons, the stars, hovered links and post titles */ --color-white: #ffffff; --color-snow: #fafafa; /* typed text in the contact form, the plus and minus of the questions */ --color-field: #bbbbbb; /* the contact fields' fill (at 15 %) */ --color-field-line: #888888; /* the contact fields' hairline (at 10 %) */ --color-focus: #0099ff; /* a focused contact field's hairline */ --color-danger: #ff2244; /* a form button that failed (at 15 %) */}Each name becomes a Tailwind class: bg-ink, text-light, text-accent. The softer whites and oranges are opacity
steps of white and accent, written on the components: text-white/80 for body text, text-white/60 for meta,
bg-white/10 for the dividers, white/5 for the hairlines, bg-white/3 for the card fills, and accent/80 to
accent/3 for the pills and the form buttons. Change --color-accent and the orange follows everywhere, glows and
shadows aside: those are written as rgb(252 80 0 / …) in --shadow-pill, --shadow-pill-hover and
--shadow-card-hover in the same file, so change them too.
The site is dark by design and has no light 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 your photo in a circle beside your name in two lines: the first part in Accent, the second in Light with an
Accent dot (“Brick” / “folio.”). It is not a picture of text, so you change the name and the photo separately, in
logo in src/content/site.ts:
export const logo: Logo = { "photo": "/images/profile-javier-martinez.png", // the round photo (a square image is cropped to a circle) "first": "Brick", // the first line, in Accent "second": "folio", // the second line, in Light, followed by the dot "label": "Brickfolio" // what screen readers read for the link};The demo uses the profile card’s photo, so one file is both. Logo in src/design-system/components/brand/Logo.tsx
draws it as a link home in the header: a box of 66 × 30 on phones, 77 × 35 on tablets and 88 × 40 above, with the name
sized to the box. A longer name runs past the box: shorten it, or change the text-[20.45cqw] size and the box widths
(w-[66px], md:w-[77px], lg:w-[88px]) in Logo.tsx. To use a logo file of your own instead, replace the photo and
the two lines with one <Image> in Logo.tsx.
Browser icon
Section titled “Browser icon”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. As in the original design they are the profile photo in a circle, so the download ships grey
placeholders: replace both with your photo or your mark. They are named in metadata.icons in src/app/layout.tsx;
change the sizes there if your files have other sizes.
The template loads Inter once, through next/font in src/app/layout.tsx, with its italic (the bold italic accent word
of the section titles) and its optical-size axis:
const inter = Inter({ variable: "--font-inter", subsets: ["latin"], style: ["normal", "italic"], axes: ["opsz"] });theme.css makes --font-inter the site font (font-sans). <body> pins Inter’s optical size to 14
([font-variation-settings:'opsz'_14] in layout.tsx), as in the original design; without it, small text runs wider
and large text narrower, and lines break at other words. Remove that class if you change the font.
Fragment Mono, the font of code in the posts, is loaded only on the post pages (src/app/blog/[slug]/page.tsx) and
used as font-mono.
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 inter = DM_Sans({ variable: "--font-inter", subsets: ["latin"], style: ["normal", "italic"] });A font that isn’t variable needs its weights listed (weight: ["400", "500", "700"]). 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.
Text styles
Section titled “Text styles”src/design-system/tokens/text.ts holds the sizes and line heights. The headings step down on tablets and phones; the
small styles keep their size.
| Style | Size (phone / tablet / laptop and up) | Used for |
|---|---|---|
h1 |
24 / 26 / 28, medium | The headline in the profile card |
h2 |
20 / 22 / 24, medium | Section titles, the newsletter title, headings in rich text |
accent |
bold italic | The accent word of a section title (“My Latest Work”) |
title |
22 / 24 / 26, medium | “More Projects”, “More Posts”, the 404 message |
h5 |
18 / 19 / 20, medium | Service titles, the two call-to-action lines |
h6 |
14 / 16 / 18, medium | Card titles, questions, experience roles |
large |
16 at 1.4 | The greeting, testimonial names, the social chips |
body |
14 at 1.4 | Section texts, the profile text, form labels, the copyright |
small |
12 at 1.4 | Card texts, quotes, prices, answers |
tiny |
10 at 1.4 | The cards’ meta line (service or category, date) |
button |
12, medium, upper case | Button labels |
nav |
12, upper case, 0.03 em apart | The header’s links |
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.small, "text-white/60")}.
Breakpoints and spacing
Section titled “Breakpoints and spacing”Four sizes, set in theme.css:
| Width | Tailwind prefix | |
|---|---|---|
| Phone | below 810 px | (none) |
| Tablet | 810–999 px | md: |
| Laptop | 1000–1439 px | lg: |
| Desktop | 1440 px and up | xl: |
On phones and tablets Home is one column: the profile card, a line, then the sections. From 1000 px the profile card
sits in a sidebar (35 % of a 1000 px column, 39 % of 1200 px from 1440) and sticks while the sections scroll beside it;
from 1440 the copyright line moves to its foot. The project and post pages are a 1000 px column. The side padding is 20
px on phones, 30 on tablets, 40 on laptops and 80 on desktops (src/app/page.tsx, PageColumn.tsx). 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.
Motion
Section titled “Motion”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, the questions opening |
roleSpring, roleInterval |
stiffness 200, damping 40; every 4 s | The roles under the name stepping up |
formTween |
0.2 s | The form buttons |
tickerSpeed |
testimonials 10, logos 20, service images 5 (px per second) | The tickers |
What moves, and where to change it:
| Effect | Where to change it |
|---|---|
| The roles under the name step up every 4 seconds and loop | RoleTicker in src/design-system/components/data/RoleTicker.tsx, the roles in profile.roles |
| The testimonials and the client logos move left without end | Ticker in src/design-system/components/media/Ticker.tsx, the speeds in tickerSpeed |
| A service card’s faint photos brighten and its two columns move (one up, one down) while it is hovered, with an orange glow (from 810 px) | ServiceCard and ImageColumns in src/design-system/components/ |
| The project and post cards take their colours and round their corners on hover | ProjectCard, PostCard |
| The social chips dim and the network’s mark appears on the hovered one | SocialList |
| The questions open and close, one at a time | FaqAccordion, Collapse |
| The phone menu drops in under the header | src/components/site/Header.tsx |
There are no page transitions and no scroll effects.
Reduced motion
Section titled “Reduced motion”With “reduce motion” switched on in the visitor’s system, the tickers stand still, the roles stay on the first one, and
Motion skips its transform 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:.
Corners, lines, shadows
Section titled “Corners, lines, shadows”Photos and cards have 10 px corners (8 px for the testimonial cards and the article covers), the newsletter box 20 px,
and the pill buttons are round-ended. Cards and chips are framed by a 1 px hairline in White 5 % drawn inside the box
(hairline in src/design-system/components/utils/surface.ts). The orange pills carry a soft inner glow that grows on
hover (shadow-pill, shadow-pill-hover); a hovered service card gets shadow-card-hover.
Components
Section titled “Components”src/design-system/components/ holds the logo, the buttons and links (PillButton, TextLink, CloseButton,
LoadMoreButton), the header’s links and menu button, the section layout (Section, Divider, SectionTitle,
ArticleHeader), the stars, the social links and the rotating roles, the cards (ProjectCard, PostCard,
ServiceCard, TestimonialCard, ExperienceCard), the tickers, the question list, the list with “load more”, the rich
text and the forms. 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: arrow-up-right (the buttons and links), plus and minus (the
questions), x (the close button), star (the ratings, the filled weight), calendar and buildings (the experience
cards, the light weight). Icon.tsx draws one in the current text colour. To add an icon:
-
Open the icon on phosphoricons.com and copy the SVG.
-
Take the
d="…"of its<path>. -
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.
The marks of Facebook, Twitter (X), Dribbble and Behance that appear over a hovered social link are SVG files in
public/icons/ (social-facebook.svg …), named by network in src/lib/to-ui.ts. For another network, add its mark
there and a line to socialIcons.