Design — Compose Digi 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 custom cursor, the components and the icons.
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 motion
vocabulary with a track to play each curve, the buttons and links, the logo and the icons, the header’s parts, the layout
pieces, the custom cursor’s looks, the cards, the rating and the process chart, the patterns (the service rows, the
testimonial slider, the plan card, the tickers, the lists with Load More, rich text), the video card and the scroll
effects, and the form with its states, 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: #101010; /* [Black 13] headings, body text, dark buttons and bands */ --color-ink-soft: #262626; /* [Black 10] */ --color-charcoal: #454545; /* [Black 09] */ --color-grey: #595959; /* [Black 08] leads, descriptions, meta */ --color-silver: #bfbfbf; /* [Black 06] lines, borders */ --color-line: #d9d9d9; /* [Black 05] dividers */ --color-mist: #f0f0f0; /* [Black 04] */ --color-surface: #f5f5f5; /* [Black 03] the header bar, light cards */ --color-background: #fcfcfc; /* [White] the page, text on dark */ --color-white: #ffffff; --color-accent: #b3ff00; /* [Accent] the lime of the active nav pill, the round arrow buttons */ --color-axis: rgba(24, 33, 45, 0.5); /* the Services process chart's dashed lines and percent labels */ --color-error: #ff2244; /* the form's error state */}Each name becomes a Tailwind class: bg-ink, text-grey, border-silver. Swap the values for your own palette and the
site changes. The template is near-black on near-white with one lime accent: ink is the text, the headings and the dark
bands (the footer’s ticker, the invitation box), background the page and the text on dark, accent the main buttons, the
current menu link and the round arrow buttons. The original design names its greys by darkness (“Black 13” darkest …
“Black 03” lightest); the names in brackets are those. Keep text on its background at 4.5 : 1 or more, or the site becomes
hard to read; Ink on Background is about 18 : 1 in the demo, Grey on Background about 6.8 : 1, Ink on the lime about
15 : 1.
Faded colours are opacity modifiers: bg-ink/50 (the veil over the photo of Home’s quote), bg-ink/80 (the veil of the
Services call to action) and bg-error/15 (the Submit button’s fill after a failed send). They follow the palette when you
change a colour.
A few colours sit outside the tokens, so change them too when you change a colour:
| Colour | Where |
|---|---|
The logo’s colours (the mark and the wordmark in #101010, the sunburst in #FCFCFC) |
src/design-system/components/brand/Logo.astro |
| The menu links’ fill (lime when current, Silver on hover) written as hex, because Motion animates them as values | src/design-system/components/navigation/NavLink.astro |
The custom cursor’s dot, ring and pill (#101010, #222222) |
src/design-system/components/cursor/Cursor.astro, src/design-system/scripts/cursor.ts |
| The footer’s year and the small rule between the phone and the e-mail | src/components/site/Footer.astro |
| The browser icons | public/icon.svg, public/apple-icon.png |
| The swatches of the style guide repeat the values as text | src/components/style-guide/tokens.ts |
The round mark with its sunburst and the two-line “Compose Digital” wordmark are drawn as SVG paths in
src/design-system/components/brand/Logo.astro, and link to Home. To use your own:
- As an SVG: replace the path data (
word,raysand the<circle>) with your logo’s, and set theviewBox="0 0 127 40"to your artwork’s size. - As an image file: put it in
public/and replace the<svg>with an<img>of it.
The caller sizes it: 127 × 40 px in the header on desktops and in the footer (h-10 w-[127px]), 95 × 30 on tablets and
89 × 28 on phones (src/components/site/Header.astro). Change those classes to fit your proportions. Its name for screen
readers is site.name. The same artwork is in src/assets/images/logo.svg for use elsewhere; the site itself draws the
logo from Logo.astro.
The browser icons are public/icon.svg (the tab) and public/apple-icon.png (180 × 180, the home screen).
The template loads two fonts with the Astro Fonts API, in astro.config.mjs: DM Sans for nearly everything and Inter for
the big service names (huge, the footer’s ticker) and the line under the footer’s logo.
fonts: [ { provider: fontProviders.google(), name: "DM Sans", cssVariable: "--font-dm-sans", weights: ["100 1000"], styles: ["normal"], subsets: ["latin"], fallbacks: ["DM Sans Fallback", "sans-serif"], optimizedFallbacks: false, }, { provider: fontProviders.google(), name: "Inter", cssVariable: "--font-inter", weights: ["100 900"], // …the same settings, with "Inter Fallback" },],Both are variable fonts; the site uses DM Sans at 400 (text), 500 (headings, the menu, buttons) and 700 (bold in rich
text), and Inter at 500. The <Font> lines in src/layouts/Layout.astro load them on every page, and theme.css makes
them the site’s two families: --font-sans (DM Sans, the default) and --font-display (Inter, the font-display
class). Italic runs in rich text are drawn by the browser.
To use another Google font, change name and keep cssVariable:
name: "Outfit",cssVariable: "--font-dm-sans",weights: ["100 900"],styles: ["normal"],fallbacks: ["sans-serif"],Give a variable font its own range (["100 900"] for Outfit), or list ["400", "500", "700"] for a font that isn’t
variable; a range the font doesn’t have makes Google Fonts refuse the request, and the build warns
No data found for font family … and leaves the site on the fallback font. The two @font-face rules at the end of
theme.css (“DM Sans Fallback”, “Inter Fallback”) are Arial resized to DM Sans’s and Inter’s measures, so the text keeps
its place while the fonts arrive. For a new font, set fallbacks: ["sans-serif"] and remove optimizedFallbacks: false
as above (Astro then computes a matching fallback itself), and delete the @font-face rule you no longer use. 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.
Text styles
Section titled “Text styles”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 |
42 | 56 | 72 | The Home hero’s title, the About figures |
h1 |
42 | 48 | 56 | Page titles |
h2 |
30 | 36 | 42 | Section titles |
h3 |
28 | 30 | 32 | The About statement, a service’s and a job’s headings, the project testimonial, the prices, rich-text headings in posts |
h4 |
24 | 26 | 28 | “WHO WE ARE?”, the plan card’s title |
h5 |
20 | 22 | 24 | Card and row titles, the quote of Home, the project’s year and client |
h6 |
18 | 19 | 20 | The ticker cards’ client, the footer’s column titles, Prev / Next, the process phases, the invitation box |
huge |
38 | 46 | 54 | Inter: the service names of the footer’s ticker |
hugeStroke |
54 | 54 | 54 | Inter: the outlined names of the footer’s ticker |
big |
18 | 18 | 18 | Leads, the testimonial slider’s quote |
paragraph |
16 | 16 | 16 | Body text, descriptions, rich text, the footer’s links |
small |
14 | 14 | 14 | Meta, card text, field labels |
menu |
13 | 13 | 13 | Upper case: the menu links, button labels, section labels |
Headings are weight 500 with a line height of 1.2 (display and h1 set 4 % tighter), the paragraph styles weight 400 at
1.4, menu 500 in upper case with a little letter spacing. 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-grey")}.
A few lines are scaled to fill their box, as in the original design: the footer’s call to action (“Tell Us Your New
Ideas”, md:text-[8.532cqw] in src/components/site/Footer.astro) and the “404” of the 404 page. A longer text runs past
the edge: lower the number until it fits.
Breakpoints and spacing
Section titled “Breakpoints and spacing”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 20 px on phones, 30 px on tablets and 40 px on desktops, and most sections have 60 / 80 / 100 px above
and below (sectionGutters and sectionPadding in src/design-system/components/layout/section.ts); the gap between a
section’s blocks is set per section (the gap prop of Section). Content is at most 1440 px wide and stays centred on
wider screens. The header is sticky at the top, 68 px tall on phones, 104 px on tablets and 112 px on desktops
(Pages and sections).
Motion
Section titled “Motion”src/design-system/tokens/motion.ts holds the springs; the scripts in src/design-system/scripts/ (and the header’s,
src/components/site/header.ts) play them with Motion, and theme.css holds the CSS curves and the ticker and spinner
animations:
| Token | Values | Used for |
|---|---|---|
spring (S0) |
no bounce, 0.4 s | The rolling labels of the buttons and menu links, the phone menu growing; anything without a transition of its own; also --ease-spring-a in CSS |
springSoft (S2) |
bounce 0.2, 0.4 s | The menu link’s fill, the buttons’ arrow turning, the text links’ underline, the service rows, the plan switch, the process chart, the team cards dimming; also --ease-spring-b |
springCard (SC) |
stiffness 500, damping 60 | The card photos’ zoom, the custom cursor’s morph, the footer’s round button, the testimonial chips; also --ease-spring-c |
springPop (SP) |
stiffness 400, damping 30 | The About video card: its veil and the Play icon |
--ease-form |
ease 0.44, 0, 0.56, 1 over 0.2 s | The Submit button’s hover and pressed fills |
animate-ticker |
linear, endless | The tickers (each sets its own speed) |
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 another
transition (soft, card, pop, instant). A part without a transition of its own moves with spring. Lower a spring’s
duration for a snappier feel, or raise bounce for a livelier one. There are no page transitions, no load animation and
nothing counts up.
| Effect | Where to change it |
|---|---|
| The Home hero’s projects run left at 20 px/s | <Ticker speed={20}> in src/components/sections/HomeHeroSection.astro; which projects, projects.tickerCount in home.json |
| The footer’s services run in two rows at 30 px/s | <Ticker speed={30}> in src/components/site/Footer.astro |
| The client logos run left at 15 px/s | <Ticker speed={15}> in src/components/sections/AboutVideoSection.astro |
| A card’s photo zooms from 105 % to 100 % on hover | ProjectCard.astro, PostCard.astro, PostNavCard.astro, ServiceCard.astro in src/design-system/components/cards/ |
| A project page’s first image settles from 120 % as you scroll | <ScrollTransform from={{ scale: 1.2 }}> in ProjectHeroSection.astro |
| Its big images lag behind the page | <Parallax speed={80}> in ProjectParallaxImageSection.astro |
| Its 2 : 1 images slide in from the right and grow from the left | ProjectSlideImageSection.astro, ProjectGrowImageSection.astro |
| Its testimonial fades in from 30 % | ProjectTestimonialSection.astro |
| A service’s photo grows from 80 % and fades in | ServiceImageSection.astro |
| The Services call to action’s photo moves with the scroll | <Parallax speed={50} offset={50}> in ServicesCtaSection.astro |
| The testimonials change every 5 seconds | testimonials.interval in src/content/pages/services.json |
| The process chart fills in once it is in view | src/design-system/scripts/process-graph.ts |
| Projects and Blog show 5 / 4 / 3 items, Careers 4, then as many more per “Load More” | list.pageSizes in projects.json and blog.json, careers.pageSizes in careers.json |
| Hovering a team card fades the others (desktops) | src/design-system/scripts/team-list.ts |
The sections above are in src/components/sections/. <ScrollTransform> moves its content from from (a scale, an
x or y shift, an opacity) to rest while the block crosses the screen; <Parallax> moves its content at speed % of the
scroll (100 = with the page).
The custom cursor
Section titled “The custom cursor”Over the page content (not the header and the footer, not on touch screens) a custom cursor follows the mouse: a 12 px
dot below and right of the pointer, a 44 px ring over the About photos and Home’s service rows, and a dark pill with a
word over the cards (“View Project”, “Read”, “More Details”) and the video’s Play button (“Play”). Elements choose it with
data-cursor: no attribute is the dot, "active" the ring, "none" no custom cursor (the post page, Contact and the 404
pass cursor="none" to their Section), any other text the pill with that word. The words are content
(cursorLabels and serviceCursorLabel in src/content/site.json, video.cursor in about.json). It is
src/design-system/components/cursor/Cursor.astro, mounted once in src/layouts/Layout.astro, and
src/design-system/scripts/cursor.ts; to go without it, delete the <Cursor /> line from the layout (the cards’ class
cursor-none hides the system cursor over them: remove it too).
Reduced motion
Section titled “Reduced motion”With “reduce motion” switched on in the visitor’s system, movement is left out: the tickers stand still, the scroll effects
of the project and service pages and the parallax don’t move, the label rolls, slides, turns and size changes jump, and the
cursor switches looks without morphing. Fades and colour changes stay. play() in src/design-system/utils/play.ts,
which the scripts animate through, makes moves, turns and sizes jump; the tickers check the setting with
motion-reduce:animate-none.
Corners, spacing, shadows
Section titled “Corners, spacing, shadows”Corners are 10 px on photos, cards, the plan card and the invitation box (8 px on the project cards’ photos); buttons, the
menu pill, the header bar, the chips and the switch are fully round, as are the avatars and the portraits. The only shadow
is the custom cursor’s faint glow. 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.
Components
Section titled “Components”src/design-system/components/ holds the buttons and links (with the rolling label), the social buttons, the logo and the
icons, the menu links and the menu button, the section layout and the divider, the custom cursor, the cards (project,
ticker, post, Prev / Next, service, job, team), the rating and the process chart, the service rows, the testimonial
slider, the plan card, the ticker, Load More, rich text, the scroll effects, the images and the video card, 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 notes. The sections
that make up a page are one level up, in src/components/sections/, and are listed in
Pages and sections.
The icons (the Phosphor arrows, plus, minus, check, star, play, quotes and the social marks of
Behance, Dribbble, Instagram, Twitter and X) are stored as path data in src/design-system/components/icons/paths.ts;
<Icon name="arrow-right" /> draws one in the current text colour. To add one:
-
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; an icon
drawn on another grid gets its viewBox in iconViewBoxes (as the Services testimonial’s quote mark). 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. A social button’s icon is picked by its network (behance,
dribbble, instagram, twitter, x); for another network, add its icon, its name to SocialNetwork in
src/design-system/types.ts and the pair to logos in src/design-system/components/actions/SocialButton.astro.