Design — Brickfolio Astro
The look of this Astro 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:4321/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.json:
"logo": { "photo": "/images/profile-javier-martinez.png", "first": "Brick", "second": "folio", "label": "Brickfolio"}photo is the round photo (a square image is cropped to a circle), first the first line in Accent, second the
second line in Light followed by the dot, and label 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.astro
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.astro. To use a logo file of your own instead, replace the photo and
the two lines with one image in Logo.astro.
Browser icon
Section titled “Browser icon”public/icon.png (192 × 192) is the icon in the browser tab and public/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 the <head> of src/layouts/Layout.astro; change
the sizes there if your files have other sizes.
The template serves Inter from its own files, through the Astro Fonts API in astro.config.mjs: the Latin variable font
with its italic (the bold italic accent word of the section titles), in src/assets/fonts/:
{ provider: fontProviders.local(), name: "Inter", cssVariable: "--font-inter", options: { variants: [ { weight: "100 900", style: "normal", src: ["./src/assets/fonts/inter-latin-variable.woff2"] }, { weight: "100 900", style: "italic", src: ["./src/assets/fonts/inter-latin-variable-italic.woff2"] }, ], }, fallbacks: ["Inter Fallback", "sans-serif"], optimizedFallbacks: false,},theme.css makes --font-inter the site font (font-sans), with a fallback sized like Inter so the page doesn’t shift
while the font loads. <body> pins Inter’s optical size to 14 ([font-variation-settings:'opsz'_14] in
src/layouts/Layout.astro), 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 declared the same way and loaded only on the post pages
(<Layout mono> in src/pages/blog/[slug].astro); it is used as font-mono.
To use another font, put its .woff2 files in src/assets/fonts/ and point the entry at them, keeping
cssVariable: "--font-inter"; or name a Google font with provider: fontProviders.google(), which the Fonts API downloads
when the site builds. A font that isn’t variable lists one variant per weight ({ weight: "400", … }). Either way the
fonts are served from your own domain, with 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
class={text.h2} or combine: class={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/pages/index.astro, PageColumn.astro). 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 animation of the scripts that sets no transition of its own (play in src/design-system/utils/play.ts): 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 | src/design-system/scripts/role-ticker.ts, the roles in profile.roles |
| The testimonials and the client logos move left without end | Ticker.astro and scripts/ticker.ts, 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.astro, ImageColumns.astro and scripts/service-card.ts |
| The project and post cards take their colours and round their corners on hover | ProjectCard.astro, PostCard.astro (CSS) |
| The social chips dim and the network’s mark appears on the hovered one | SocialList.astro and scripts/social-list.ts |
| The questions open and close, one at a time | FaqAccordion.astro, scripts/faq.ts and scripts/collapse.ts |
| The phone menu drops in under the header | src/components/site/Header.astro and header.ts next to it |
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
moves, turns and size changes jump to their end. Fades and colour changes stay. The scripts check the setting through
reducedMotion in src/design-system/utils/play.ts; the CSS animations 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. Their props are typed in src/design-system/types.ts; the browser scripts of the interactive ones
(the roles, the tickers, the service cards, the social links, the menu, the questions, “load more” and the forms) are in
src/design-system/scripts/. 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.astro 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" class="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.