Skip to content
Sign inJoin waitlist

Design — Lookis 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, the springs and timings, the buttons and links, the logo and the icons, the menu button, the layout pieces, the cards, the numbers, the patterns (the name ticker, the testimonial slideshow, the gallery, the questions, rich text, the 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; /* [Black] text, the black buttons, label dots */
--color-line: #ececec; /* [Line] dividers and borders */
--color-paper: #fafafa; /* [White] the page, the header, the footer card, text on photos */
--color-spinner: #999999; /* the ring of the loading spinner */
--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 */
}

Each name becomes a Tailwind class: bg-ink, text-paper, border-line. Swap the hex values for your own palette and the site changes. The template is black on near-white: ink is the text and the buttons, paper the page and the text on photos. Keep text on its background at 4.5 : 1 or more, or the site becomes hard to read; Black on White is about 20 : 1 in the demo.

Faded colours are opacity modifiers on Black, named as in the original design:

Modifier Framer name Used for
ink/80 Black 80 roles, answers, prices, the section labels
ink/60 Black 60 the footer’s column titles
ink/50 Black 50 the veil over the testimonials photo, question numbers, a focused field’s border, the Submit button’s hover
ink/30 Black 30 outlined circles and price pills, the fields’ placeholders
ink/20 Black 20 the slideshow’s arrows
ink/2 Black 02 the fill of the cards: numbers, awards, services, the contact form, the tinted gallery band

They follow the palette when you change ink. The placeholders of the fields (Black 30 on White) are light by design, about 2 : 1: a darker value reads better.

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

Colour Where
The dark gradient over the project cards’ photos (black at 0 % and 50 %, written as rgb() values) src/design-system/components/cards/ProjectCard.astro
The browser icons: black for a light browser theme, white for a dark one public/icon-light.png, public/icon-dark.png, public/apple-icon.png
The logo as a file (black) src/assets/images/logo.svg
The swatches of the style guide repeat the hex values as text src/components/style-guide/tokens.ts

The “Daniel Mercer” wordmark, on two lines, is drawn as an SVG path in src/design-system/components/brand/Logo.astro, in the current text colour, and links to Home. It sits in the middle of the header on desktop and at the left on tablets and phones. To use your own:

  • As an SVG: replace the string in wordmark with your logo’s path data, and set the viewBox="0 0 330 162" and the aspect-[330/162] class to your artwork’s size.
  • As an image file: put it in public/ and replace the <svg> with an <img> of it.

It is 72 × 35 px from tablets up and 62 × 30 on phones: change w-[72px] and w-[62px] in Logo.astro to fit your proportions. Its name for screen readers is site.name. The same artwork is in src/assets/images/logo.svg (black) for use elsewhere; the site itself draws the logo from Logo.astro.

The photographer’s name also runs across the top of Home in large letters: that is text, hero.name in src/content/pages/home.json, not the logo.

The browser icons are public/icon-light.png and public/icon-dark.png (180 × 180, for light and dark browser themes) and public/apple-icon.png (180 × 180, the home screen).

The template loads Inter with the Astro Fonts API, in astro.config.mjs:

fonts: [
{
provider: fontProviders.google(),
name: "Inter",
cssVariable: "--font-inter",
weights: ["100 900"],
styles: ["normal"],
subsets: ["latin"],
fallbacks: ["sans-serif"],
options: { experimental: { variableAxis: { opsz: [["14", "32"]] } } },
},
],

Inter is one variable font here: every weight and its optical-size axis (variableAxis). The text styles pin that axis to 14, Inter’s text cut, written as [font-variation-settings:'opsz'_14] in src/design-system/tokens/text.ts, so the browser never switches to the display cut on its own. The <Font> line in src/layouts/Layout.astro loads it on every page, and theme.css makes --font-inter the site font (--font-sans). Only Inter’s upright style is loaded: an italic run in a project or a service is the browser’s slanted version of the regular text; add "italic" to styles to load the real italic.

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

name: "Manrope",
cssVariable: "--font-inter",
weights: ["200 800"],
styles: ["normal"],

Leave out options unless the new font has an optical-size axis: Google Fonts refuses the request otherwise, and the build warns No data found for font family … and leaves the site on the fallback font. Without the axis, the font-variation-settings in the text styles simply do nothing. The text is set in weight 400 and the photographer’s name on Home (and the clock) in 500: give a variable font its own range (["200 800"] for Manrope), or list ["400", "500"] 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 font when the site builds and serves it 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, named as in the original design:

Style Phone Tablet (md:) Desktop (lg:) Used for
display 60 100 150 The name running across the Home hero
h1 30 40 54 Page titles
h1Small 24 26 28 The Home hero’s introduction
h2 28 38 48 Section titles, the big numbers
h3 26 30 36 The titles of About’s blocks, of a project’s and a service’s parts and of the contact card
h4 22 26 30 A service’s price row, the “404” of the 404 page
h5 20 24 28 Card and row titles, questions, the footer’s “Let’s Connect”
h6 20 22 24 Quotes, award titles, numbered rows
big 18 18 18 Leads, descriptions, rich text, prices, the footer’s links
paragraph 16 16 16 Card text, roles, small print
menu 16 16 16 The header’s links and clock, button labels
label 12 12 12 The labels with a dot above section titles (upper case)

Everything is Inter at weight 400 with no letter spacing; display is weight 500. The line height is 1 for display, 1.1 for h1, h2 and h3, 1.4 for big and paragraph, and 1.2 for the rest. 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-paper")}.

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 10 px on phones, 20 px on tablets and 30 px on desktops, and most sections have 40 / 60 / 80 px above and below and 50 px between their blocks (sectionGutters, sectionPadding and sectionGap in src/design-system/components/layout/section.ts). Content is at most 1728 px wide (1440 for Home’s “About me”, “My numbers” and “My Services” and the questions of Services: the width prop of Section). The two-column pages (About, Services, a service, Contact, a project) use splitPadding from layout/split.ts. The header sticks to the top, 70 px tall on phones and 95 px from tablets up (Pages and sections).

src/design-system/tokens/motion.ts holds three springs and a few timings. The scripts in src/design-system/scripts/ (and the header’s, src/components/site/header.ts) play them with Motion:

Token Values Used for
spring (S0) no bounce, 0.4 s Nearly every hover and change: the buttons’ rolling label, the links’ underlines, the phone menu and its button, the project cards, the service rows dimming, the introduction’s words
springSoft (S2) bounce 0.2, 0.4 s The questions opening, the Portfolio cards sliding after a filter, the arrow circles, the gallery tiles, the footer links dimming
slideSpring (SL) stiffness 200, damping 40 (about 1.35 s) One step of the testimonial slideshow
hoverDelay 500 ms The second step of the links’ hover: the solid underline, the arrow’s turn
wordStagger 0.05 s The words of the Home introduction, one after the other
slideInterval 4000 ms The slideshow moves on every 4 s
nameTickerSpeed 30 px a second The name running across the Home hero
filterDelay 420 ms Portfolio’s cards change this long after a tab is pressed

theme.css holds two springs as CSS curves for the hovers that run without a script (--ease-s0 and --ease-s2, over 400 ms: the project cards, the service rows, the cards’ arrow circles, the gallery tiles, the footer links) and --ease-form (the colours of the form’s button, 0.2 s, and the spinner’s fade, 0.3 s). Lower a spring’s duration for a snappier feel, or raise bounce for a livelier one. The template has no scroll reveals and no page transitions: the Home introduction is the only thing that moves as a page loads.

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 (the buttons’ rolling label). The menu links, the filter tabs and the arrow links hover in two steps: data-stages and data-variants, played by scripts/stages.ts, the second step 0.5 s after the first. A part without a transition of its own moves with spring.

Effect Where to change it
The name runs across the Home hero at 30 px a second, 30 px between copies nameTickerSpeed in tokens/motion.ts; gapClass on <Ticker> in src/components/sections/HomeHeroSection.astro
The Home introduction appears word by word <WordAppear> in HomeHeroSection.astro (wordStagger sets the pace); a plain <p> with the same class shows at once
Portfolio shows four projects, then four more as the visitor scrolls pageSize in src/components/sections/PortfolioProjects.astro
Home shows six projects projects.count in src/content/pages/home.json
The slideshow moves every 4 s slideInterval in tokens/motion.ts
The questions of Services all start closed and open one by one src/design-system/components/patterns/FaqList.astro and scripts/faq.ts
The Home hero and the 404 photo are as tall as the window (80 % on tablets) h-svh md:h-[80svh] lg:h-svh in HomeHeroSection.astro and NotFoundSection.astro

With “reduce motion” switched on in the visitor’s system, movement is left out: the name stands still, the introduction’s words fade in where they stand, the slideshow neither moves on its own nor slides (the arrows jump to the next quote), the spinners stand still, and the hovers of the cards, the service rows, the gallery tiles and the questions change without a transition. Fades and colour changes stay. play() in src/design-system/utils/play.ts, which every script animates through, makes moves, turns and sizes jump; the ticker, the spinners and the CSS hovers check the setting in CSS (motion-reduce:).

Corners are 10 px on photos, project frames, cards, gallery tiles, the hero and the footer card, and 4 px on the form fields, the Submit button, the service rows’ photos and the testimonial portraits. Buttons, price pills and arrow circles are round. There are no drop shadows: card borders are 1 px lines drawn inside (shadow-[inset_0_0_0_1px] shadow-line or ring). 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 (with the rolling label and the two-step underlines), the logo and the icons, the menu button, the section layout, the section heading and the two-column shell, the cards (project, service row and card, testimonial, award), the images, the numbers and the numbered lists, rich text, the ticker, the testimonial slideshow, the gallery, the questions, the word-by-word text, the spinner 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 where it is used, 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 two icons (the Phosphor arrow and plus) are stored as path data in src/design-system/components/icons/paths.ts; <Icon name="arrow-up-right" /> 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" class="size-5" />. 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. The slideshow’s two arrows are drawn in TestimonialSlider.astro, not taken from paths.ts.