~/designkit/components/

Components

The classes in kit.css. Each preview is rendered from the exact markup printed below it.

~/designkit/kit.css

Classes

.btn

Mono, 0.9rem, 600, a surface with a border. On hover: a lighter surface, a teal border and a glow. Works on links and buttons.

btn.html
<a class="btn" href="#btn">Read the docs</a>
<button class="btn" type="button">Copy</button>

.btn.btn-primary

Teal fill with --accent-ink text and a light sweep on hover. One per view.

btnPrimary.html
<a class="btn btn-primary" href="#btnPrimary">Get started</a>

.tag

A small mono chip, muted, teal on hover.

TypeScript Svelte Tailwind
tag.html
<span class="tag">TypeScript</span>
<span class="tag">Svelte</span>
<span class="tag">Tailwind</span>

.glass

The frosted card: surface, border, 14px radius, blur and shadow. Translucent, so the backdrop shows through.

A frosted card

The backdrop shows through.

glass.html
<div class="glass" style="padding: 1rem 1.2rem">
  <h3>A frosted card</h3>
  <p>The backdrop shows through.</p>
</div>

.glass.ring

The same card with a rotating teal to purple border on hover and focus. For cards you can click.

ring.html
<a class="glass ring" href="#ring" style="display: block; padding: 1rem 1.2rem; text-decoration: none">
  <h3>A card you can click</h3>
  <p>Hover or focus it.</p>
</a>

.caret

A blinking block cursor. It is decoration, so hide it from screen readers.

joey@designkit:~$ ls

caret.html
<p class="mono">joey@designkit:~$ ls<span class="caret" aria-hidden="true"></span></p>

.kw .str .num-t .fn .prop .com .punc

The syntax colours as classes, for anything that looks like code.

const radius = 14; // px
setTheme('light');
syntax.html
<pre class="mono"><span class="kw">const</span> <span class="prop">radius</span> <span class="punc">=</span> <span class="num-t">14</span><span class="punc">;</span> <span class="com">// px</span>
<span class="fn">setTheme</span><span class="punc">(</span><span class="str">'light'</span><span class="punc">);</span></pre>

.mono

Switches to JetBrains Mono. For file paths, labels and meta.

~/joey/skills.ts

mono.html
<p class="mono">~/joey/skills.ts</p>

:focus-visible

Every focusable element gets a 2px --accent-text outline with a 3px offset. Never remove it.

focus.html
<button class="btn" type="button">Tab to me</button>

.skip

The "skip to content" link: the first thing in <body>, pointing at #main. It slides in when it gets focus.

skip.html
<a class="skip" href="#main">Skip to content</a>

.sr-only

Visually hidden, still read by screen readers. Here it tells that the link opens a new tab.

srOnly.html
<a class="btn" href="#srOnly">GitHub ↗<span class="sr-only"> (opens in a new tab)</span></a>

.reveal

Reveal on scroll. Put .js on <html>, .reveal on the element, and add .in once it is in view.

Fades in, rises 18px and sharpens.

reveal.html
<div class="glass reveal in" style="padding: 1rem 1.2rem">
  <p>Fades in, rises 18px and sharpens.</p>
</div>

~/designkit/layout.html

Layout

This page is built with the same three classes: .section for the vertical rhythm, .container for the width, .section-head for a title with its intro.

section.html
<section class="section">
  <div class="container">
    <div class="section-head">
      <h2>&lt;Skills/&gt;</h2>
      <p>One line about the section.</p>
    </div>
    …
  </div>
</section>

~/designkit/blur.css

Blur

Always write -webkit-backdrop-filter before backdrop-filter. Lightning CSS, used by Vite 8 and Tailwind 4, merges the two and keeps the last one. If that is the prefixed one, Chrome shows no blur.

panel.css
.panel {
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}