Hoofdstijl

The main style for new projects, taken from the task board and made general. Graphite, calm and dense; colour only where it means something. Light and dark are equals. Use it when Niels chooses the Hoofdstijl for a new project.

How to use

Web

Link the stylesheet, or copy it into the project so it can never change under you. Add class="reading" to <body> on a website for 16 px body text and bigger headings. Dark mode follows the system; force it with data-theme="dark" or "light" on <html>.

<link rel="stylesheet" href="https://design.nielskorte.nl/hoofdstijl/hoofdstijl.css">
SwiftUI

Drop Hoofdstijl.swift into the app target. Colours switch with the system appearance. Type is the system font at Apple's text styles; spacing, radius and motion are constants.

Text("Hello").foregroundStyle(Hoofdstijl.text)
  .padding(Hoofdstijl.Space.m)
  .background(Hoofdstijl.surface, in: .rect(cornerRadius: Hoofdstijl.Radius.card))

Principles

Calm and denseNeutral surfaces, thin lines, almost no shadow. Information, not decoration.
Graphite, no colour accentThe accent is near-black in light and near-white in dark (Niels chose it over indigo and teal for the board). Colour is kept for meaning.
Tokens, never raw valuesEvery colour, size and radius comes from a custom property. A raw hex in a component is a bug.
Quiet motionShort fades and slides, 120 to 220 ms. Everything respects reduced motion.
Works on a phoneOne breakpoint around 860 px. Below it, sidebars become drawers and controls grow to 34 px.
Plain wordsSentence case, verbs on buttons, no em-dashes.

Colour

Read from hoofdstijl.css when this site is built. A split chip shows light (left) and dark (right). Click a swatch to copy its hex.

Surfaces

Back to front: page, panels and inset boxes, cards and inputs, dialogs.

Text

Three steps. Pick the strongest one the content deserves.

Lines and states

Borders and the hover and pressed fill of anything clickable.

Accent (graphite)

Near-black in light, near-white in dark. Primary buttons, focus, the current choice. Links are underlined because the accent is not a colour.

Meaning

Only for what the colour says, each with a soft fill.

Categorical

Dots, tags and chart series. Same in light and dark. Never as a fill behind text.

Contrast
Foreground on backgroundLightDark
--text on --surface16.92 AAA14.69 AAA
--text on --bg15.68 AAA16.00 AAA
--muted on --surface5.22 AA6.33 AA
--muted on --bg4.84 AA6.90 AA
--faint on --surface2.70 decoration3.27 large text
--accent-ink on --accent15.36 AAA15.45 AAA
--info on --info-soft4.57 AA6.57 AA
--ok on --ok-soft3.98 large text7.37 AAA
--danger on --surface5.06 AA6.86 AA
--danger on --danger-soft4.43 large text6.16 AA

Typography

The system font: SF Pro on Apple devices, Segoe UI on Windows, Inter where installed. Monospace for ids, paths and code. Weights 400, 550 (buttons, current item), 600 and 650 (titles).

--fs-3xl · 44pxWebsite hero
--fs-2xl · 32pxPage title (h1), website h2
--fs-xl · 24pxSection title (h2)
--fs-lg · 19pxSub-section (h3)
--fs-md · 16pxWebsite body text (body.reading)
--fs · 13.5pxApp body text, 13.5 px
--fs-sm · 12.5pxSmall buttons, meta
--fs-xs · 11pxEyebrows, column heads
--monoT-58 · ~/Projects/design-system-nielskorte

Space, radius, depth

Spacing
--sp-14px
--sp-28px
--sp-312px
--sp-416px
--sp-520px
--sp-624px
--sp-832px
--sp-1248px
--sp-1664px
Radius
--r-sm6px
--r8px
--r-lg10px
--r-xl12px
--r-pill999px

6 for small controls, 7 to 8 for buttons, inputs and cards, 10 for panels, 12 for dialogs, pill for labels.

Depth
--shadow

Cards, buttons. Barely there.

--shadow-lg

Dialogs, drawers, toasts.

Components

Class names are the same as on the task board, so code moves between projects without renaming.

Buttons

One primary button per view. .btn · .primary · .ghost · .danger · .small · .large · .icon-btn

Inputs and controls
Labels
NeutralRunningDoneLateFreelancePersonalOnline⌘K
Cards, tiles, callouts
Card

Radius 8, line border, light shadow.

Open cards
24
3 overdue
Inset

On the panel colour, for grouped content.

An agent is working on this card.
Saved and published.
The deploy failed. Nothing changed on the live site.
Dialog and toast

Start a new project

Which style should it use?

Copied #24242e
Navigation and table
ProjectStyleCards
PilwijsOwn4
New siteHoofdstijl1