Skip to content
Sign inJoin waitlist

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

Run npm run dev and open http://localhost:4321/style-guide. It shows the colours, the text styles and the motion tokens, then every component in its states, each with its name: the logo and the icons, the buttons and links, the menu button and the footer links, the layout pieces, the media and motion pieces, the cards, the figures and the awards table, the patterns (the services switcher, the team picker, rich text, the spinner) and the forms with their fields and button states. 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; /* [Black] headings, text, the black buttons and the footer */
--color-grey: #707070; /* [Grey] paragraphs and captions on the page colour */
--color-line: #b4b4b4; /* [Line] dividers, the ruler ticks, field borders */
--color-brown: #c36036; /* [Brown] the accent: buttons, the current link, icons, the logo mark */
--color-page: #f5f1e5; /* [Background] the page */
--color-white: #ffffff; /* [White] cards, text on photos */
/* …and the form's fill, chevron and error colours, and the spinner's */
}

Each name becomes a Tailwind class: bg-ink, text-grey, bg-brown. Swap the hex values for your own palette and the site changes. The template is black and grey on a warm cream page, with white cards, a black footer and one accent, Brown: the Primary buttons (“Let’s talk”, “Book a call”), the current menu link, the hover colour of titles and links, the icons and the logo’s mark. Black on the page is about 18.6 : 1. Grey on the page is about 4.4 : 1, a little under the 4.5 : 1 that accessibility guidelines ask for small text; a slightly darker grey (#666666, about 5.1 : 1) passes if that matters to you.

Faded colours are opacity modifiers on a token:

Modifier Used for
ink/50 The veil over the Home video, the quote and call-to-action photos, the project cover and the 404 photo
line/50 The lines between the award rows
ink/40 A select’s disabled placeholder choice

They follow the palette when you change the token.

A few colours sit outside the tokens, so change them too when you change a colour:

Colour Where
The page colour behind the header bar, as rgba(245, 241, 229, …) (the bar fades it in when it turns cream), and the white of the open phone menu src/components/site/Header.astro, src/components/site/header.ts
Black and Brown as hex values in the hovers (Motion animates values, not theme variables): the buttons, the project and service cards, the footer links, the services switcher src/design-system/components/actions/Button.astro and button.ts, cards/ProjectCard.astro, cards/ServiceCard.astro, navigation/FooterLink.astro, patterns/ServicesSwitcher.astro, scripts/services-switcher.ts, utils/motion.ts (all in src/design-system/)
The browser icon (the mark, with its Brown pieces) public/icon.svg, public/apple-icon.png
The swatches of the style guide repeat the hex values as text src/components/style-guide/tokens.ts

The “Cerette” wordmark is drawn as an SVG in src/design-system/components/brand/Logo.astro: the letters in the current text colour (black in the header, white over the Home video, a project’s cover and in the footer) and the small mark over the C in Brown (fill-brown). The caller sets its size: 110 × 25 in the header on tablets and desktops (79 × 18 on phones), 88 × 20 in the footer. To use your own:

  • As an SVG: replace the <path> elements with your logo’s paths, and set viewBox="0 0 110 25" to your artwork’s size. The header and the footer set a width and a height: change the h-… and w-… classes that go with <Logo> in src/components/site/Header.astro and Footer.astro if your logo has other proportions.
  • As an image file: put it in public/ and replace the <svg> with an <img> of it; keep a white version for the footer and the pages that start with a dark cover.

In the header and the footer the logo links to Home, named for screen readers with site.name.

The browser icon is public/icon.svg and the home screen icon public/apple-icon.png (180 × 180).

The template loads three Google fonts with the Astro Fonts API, in astro.config.mjs:

Font cssVariable Weights Used for
Plus Jakarta Sans --font-jakarta "200 800" (variable) Every text style but Quotes
Marcellus --font-marcellus 400 The Quotes style (the founder’s quote)
Inter --font-inter "100 900" (variable) The form fields and the Submit button’s “Thank you” / error labels
{
provider: fontProviders.google(),
name: "Plus Jakarta Sans",
cssVariable: "--font-jakarta",
weights: ["200 800"],
styles: ["normal"],
subsets: ["latin"],
fallbacks: ["sans-serif"],
},

The <Font> lines in src/layouts/Layout.astro load them on every page, and theme.css maps them to Tailwind: --font-sans (Plus Jakarta Sans, the site font), --font-quote (Marcellus, font-quote) and --font-field (Inter, font-field). The text is set in weights 500 and 600, bold runs in rich text in 700, everywhere at −3 % letter spacing. Only the upright style is loaded: an italic run in a post is the browser’s slanted version of the regular text; add "italic" to styles to load the real italic if your font has one.

To use another Google font, change name and keep cssVariable:

name: "DM Sans",
cssVariable: "--font-jakarta",
weights: ["100 1000"],
styles: ["normal"],

Give a variable font its own range, or list ["400", "500", "600", "700"] for a font that isn’t variable. For a font you have licensed yourself, use fontProviders.local() with your files, for example in src/assets/fonts/ (see the Astro fonts guide). Astro downloads the fonts when the site builds and serves them from your own domain either way, so there is no request to Google at runtime. If you change a cssVariable, change it in the <Font> lines of Layout.astro and in theme.css too.

src/design-system/tokens/text.ts holds the sizes and line heights, named as in the original design:

Style Phone Tablet (md:) Desktop (lg:) Weight Used for
display 50 100 120 600 The big titles of the inner pages (“Studio.”, “Articles.”) and a project’s cover
h1 40 48 56 600 The Home hero’s title, the post, service, legal and 404 titles, the names of the team picker
h2 30 36 42 600 Section titles, the call to action, “Other Work”, “Similar posts”
h3 28 32 36 600 Headings of posts and legal pages, a project’s overview, “About service” and “What’s included”
h4 24 26 28 600 The About statement, the services switcher’s titles
h5 20 22 24 600 The figures’ “+” and “%”, a project’s result
h6 18 19 20 600 Card titles, the 404 subtitle
number 52 62 94 600 The figures
big 18 18 18 500 The Home hero’s text, the small text beside the big titles, the legal date line, the testimonials’ quotes
paragraph 16 16 16 500 Body text
small 14 14 14 500 Card text, the footer
menu 12 12 12 600 The header’s links, button labels, the labels before section titles (upper case)
tiny 12 12 12 500 Captions, client roles
quote 20 19 24 400 The founder’s quote (Marcellus)

The display and number styles have a line height of 1.1 and 1.0, the headings 1.2, the paragraph styles 1.4, Menu 1.1 and Tiny 1.2. 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.h6, "text-white")}.

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:

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, sectionPadding and sectionGap in src/design-system/components/layout/section.ts). Content is at most 1440 px wide (the width prop of Section). The header is fixed at the top, 58 px tall on phones and 83 from tablets up; inner pages give their first section pageTitleSpace (src/components/sections/page-title.ts), which takes the same room (Pages and sections).

Corners: there are none. Photos, cards, buttons and fields are square; only the button dots, the label’s ring, the avatars and the phone accordion’s circle are round. 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.

src/design-system/tokens/motion.ts holds the transitions and timings, named as in the original design. The scripts in src/design-system/scripts/ (and the header’s, src/components/site/header.ts) play them with Motion:

Token Values Used for
tweenAppear (T1) 1 s, cubic-bezier(0.59, 0.25, 0.12, 1.17) (overshoots about 2 %) Blocks rising into view, the title words and intro lines
heroRise (E6 / E4) 0.6 s / 0.4 s after 0.2 s, from 50 px low The Home hero’s label and buttons (CSS animations in theme.css)
charAppear (TX) per character, 0.05 s apart, out of a 10 px blur The Home hero’s title and text
titleWords (TW), introLines (TL) per word out of a 7 px blur; per line, 7 px low The big titles of About and Projects and the intro under them
spring (S0) no bounce, 0.4 s The label roll of every button and link, the button dots, the header’s background, the phone menu, the post cards’ zoom; every part without a transition of its own
springSoft (S2) bounce 0.2, 0.4 s The menu button’s X, the accordion’s plus / minus, the switcher’s titles, the team picker
tweenIn (TI) 0.4 s ease in, cubic-bezier(0.5, 0, 0.88, 0.77) The project and service cards’ hover
appearOffset, appearStagger 18 px, 0.1 s Blocks rise 18 px into place; staggered blocks (the figures, the award photos) start 0.1 s apart
cardZoom 1.05 The card photos sit at 105 % and zoom out to 100 % on hover

theme.css holds the same curves for what runs in CSS (--ease-t1, --ease-ti, --ease-e, and the springs as --ease-s0 and --ease-s2 over 400 ms), --ease-form (the Submit button’s fills and the spinner’s fade) and the CSS animations (animate-hero-label, animate-hero-buttons, animate-load-rise, animate-turn). There are no page transitions, no parallax, no intro loader and no custom cursor.

Hovers are attributes in the markup. data-hover marks the element you point at and data-motion gives each part that changes its two states (rest and hover), played by src/design-system/scripts/hover.ts; data-transition names the token a part moves with.

Effect Where to change it
The Home hero’s title and text appear character by character <CharAppear> in src/components/sections/HomeHero.astro; replace it with a plain <h1> / <p> (keep its class) to show the text at once
The big titles of About and Projects appear word by word the animate prop of <PageTitle> in src/components/sections/AboutIntro.astro and ProjectsMain.astro
Blocks rise into view as you scroll <Appear> around them in the sections; remove the wrapper (keep its class) to show a block at once. Services, a service, a project and a post have no scroll effects, as in the original design (still)
The header turns the page colour once the section after Home’s video (or a project’s cover) reaches the middle of the window headerSwitch on the Section of HomeAbout.astro and ProjectInfo.astro; src/components/site/header.ts
The services switcher (tabs on desktops and tablets, an accordion on phones) src/design-system/components/patterns/ServicesSwitcher.astro, scripts/services-switcher.ts
The team picker on About (desktops) src/design-system/components/patterns/TeamPicker.astro, scripts/team-picker.ts
About’s team cards: six at first on tablets and phones, the rest as you scroll team.pageSize in src/content/pages/about.json
Blog shows six posts on desktops (four below), then a page more as you scroll blogPage.pageSize in src/content/pages/blog.json
Home shows six projects and the three newest posts projects.slice(0, 6) in src/pages/index.astro; blog.count in home.json
“Other Work” shows three projects, “Similar posts” up to three posts other.count in src/content/pages/project.json; postPage.similar.count in blog.json

With “reduce motion” switched on in the visitor’s system, movement is left out: blocks, characters and title words fade in where they stand, and moves and size changes jump to their end. Fades and colour changes stay. play() in src/design-system/utils/play.ts, which every script animates through, does this; the CSS animations have -fade versions for the same case. The Home video keeps playing: remove autoplay from the <video> in HomeHero.astro if you want it still.

src/design-system/components/ holds the buttons and links (with the rolling label and the dot), the logo and the icons, the menu button and the footer link, the section layout, the label, the ruler and the title section, the photos and the grain, the motion wrappers, the cards (project, post, service, testimonial, value, team), the figure and the awards table, the quote and call-to-action bands, the patterns (the services switcher, the team picker, rich text, the spinner, the character effect) and the form parts. Their behaviour is in src/design-system/scripts/: each component with state calls an init*() function from its own <script>. The README lists every component with its props, and every script with what it does. 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 icons stored as path data in src/design-system/components/icons/paths.ts: arrow-up-right, arrow-up, arrow-right, check and star, and in the light weight the six of the value cards (blueprint, crane-tower, users, kanban, windmill, lightbulb-filament). <Icon name="arrow-up-right" /> draws one in the current text colour. A value card names its icon in the content (why.points[].icon in home.json and services.json). 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" class="size-5" />, or "icon": "my-icon" in a value card. Paths use a 256 × 256 grid, which is what Phosphor exports; an icon drawn on another grid gets its viewBox in iconViewBoxes. If you keep the style guide, add the new name to icons in src/components/style-guide/tokens.ts too: that list is exhaustive on purpose, so npm run check reports it until you do.