joey@designkit:~$ npm i @joeykwispel/design-kit
One design kit, every subdomain.
The colours, type, components and header of joeyoosenbrug.nl as one npm package. Every app installs it, so they all look and behave the same. This site is built with it too.
~/designkit/install.sh
Install
One package, plus the two fonts it is designed around. The fonts are self-hosted, so no visitor is sent to Google.
npm i @joeykwispel/design-kit @fontsource-variable/inter @fontsource-variable/jetbrains-mono~/designkit/quick-start.md
QuickStart
From an empty app to the right colours, fonts and header. Pick the stack you are on.
Install the kit and the fonts.
terminal npm i @joeykwispel/design-kit @fontsource-variable/inter @fontsource-variable/jetbrains-monoLoad the fonts and the two stylesheets once, in the root layout.
src/routes/+layout.svelte <script lang="ts"> import '@fontsource-variable/inter'; import '@fontsource-variable/jetbrains-mono'; import '@joeykwispel/design-kit/kit.css'; import '@joeykwispel/design-kit/header.css'; import Header from '$lib/components/Header.svelte'; let { children } = $props(); </script> <Header locale="en" /> <main id="main">{@render children()}</main>Write a small header of your own that hands your links and languages to the kit’s header.
src/lib/components/Header.svelte <script lang="ts"> import { page } from '$app/state'; import { Header, headerLabels } from '@joeykwispel/design-kit/svelte'; // 'en' | 'nl', from wherever your app keeps it let { locale } = $props(); const links = $derived([ { label: 'Play', href: '/play/', current: page.url.pathname === '/play/' }, { label: 'Scores', href: '/scores/', current: page.url.pathname === '/scores/' } ]); const languages = $derived([ { code: 'en', href: '/', current: locale === 'en' }, { code: 'nl', href: '/nl/', current: locale === 'nl' } ]); </script> <Header {links} {languages} labels={headerLabels[locale]} />Set the theme before the first paint. app.html is a static file, so a server hook fills the script in.
src/app.html <html lang="en" data-theme="dark"> <head> <meta name="theme-color" content="#0a0e17" /> <script> %jo.theme% </script> %sveltekit.head% </head>src/hooks.server.ts import { themeScript } from '@joeykwispel/design-kit/theme-script'; export const handle = ({ event, resolve }) => resolve(event, { transformPageChunk: ({ html }) => html.replace(/<script>\s*%jo\.theme%\s*<\/script>/, () => '<script>' + themeScript + '</script>') });
~/designkit/package.json
Contents
Each part is its own import, so an app takes only what it uses.
@joeykwispel/design-kit/kit.cssTokens for both themes, base styles, the backdrop, buttons, tags and cards.
@joeykwispel/design-kit/header.cssThe styles of the header. Classes start with jo-nav, so nothing clashes.
@joeykwispel/design-kit/headerWhat the header does: scroll bar, mobile menu, theme switch, Ctrl K.
@joeykwispel/design-kit/svelteThe header as a Svelte 5 component.
@joeykwispel/design-kit/reactThe header as a React component, for Next.js and friends.
@joeykwispel/design-kit/header.htmlThe header as plain markup, for anything else.
@joeykwispel/design-kit/tokensEvery token value as typed JavaScript, for canvas and generated images.
@joeykwispel/design-kit/tailwind.cssThe tokens as Tailwind 4 theme variables: bg-bg, text-muted, font-mono.
@joeykwispel/design-kit/theme-scriptThe script that sets the theme before the first paint, and its CSP hash.
~/designkit/sites.ts
Sites
The sites this design is made for. They share one theme: switch to light on one and the others follow.
- Portfolio ↗(opens in a new tab) joeyoosenbrug.nl Where the design was born. Everything here started as its stylesheet. SvelteKit
- Arcade ↗(opens in a new tab) arcade.joeyoosenbrug.nl Small browser games, each in a different language. SvelteKit
- Tools ↗(opens in a new tab) tools.joeyoosenbrug.nl Developer tools that run in your browser. SvelteKit
- CodeGuessr ↗(opens in a new tab) codeguessr.joeyoosenbrug.nl Guess the language from a snippet of code. Angular
- DevCity ↗(opens in a new tab) devcity.joeyoosenbrug.nl My skills as a 3D city at night. Next.js + Tailwind