← Examples

Slate

A flat, system-font tool surface — no animation, no Google Fonts, no atmosphere. Just dark cards in a tight grid.

Used on every interactive visualizer and on the /tutorials/ and /theory/ hubs that index them. The job is to stay out of the way of the math demo it's wrapping.

Card grid

Buttons

Primary Secondary Tertiary

Code

// Slate uses Consolas for code, periwinkle for keywords
const palette = {
  bg:     '#0a0a0f',  // flat dark
  card:   '#12121a',
  accent: '#7c8cf8',  // periwinkle
};

Style breakdown

The minimal token set Slate keeps reusing.

Palette
#0a0a0f bg
#12121a card
#16161f hover
#1e1e2a border
#d0d0dc body
#e8e8f0 strong
#7c8cf8 accent
#777793 mute
Typography
'Segoe UI', system-ui, -apple-system, sans-serif — whatever the OS already has. No web-font fetch.
Code: 'Consolas', 'Monaco', monospace.
Headlines
h1 at 2.2rem 700, letter-spacing: -0.5px, with the same gradient-text trick (white → periwinkle) for one understated flourish. h2s are mono caps in periwinkle, letter-spacing: 1.5px.
Components
Cardborder-radius: 8px, padding 16×18px, hairline border lifts to #3a3a55 on hover, surface lifts to #16161f.
Button — same shape as a card with smaller text. Primary just swaps text color to accent.
Code block — slightly darker than body bg, same hairline.
Spacing
Page padding 64 px (visualizer pages drop to 40 px). Container 760 px. Card grid gap 12 px. Section gaps 44 px.
Signature motif
Absence. No background animation, no shadows, no gradients except a single one in the h1. Hover state is a 1 px transform plus a one-shade border lift. The whole point is to not compete with the visualization the page is wrapping.
In use: /tutorials/ · /theory/ · every per-visualizer page (/dotproduct/, /cnn/, /attention/, /mlp/, /lstm/, /regression/…).