Design tokens
Every value is a CSS custom property prefixed with --hc-, and is also exported from @hackclub/tokens as JavaScript and JSON.
.card {
background: var(--hc-surface);
border-radius: var(--hc-radius-card);
box-shadow: var(--hc-shadow-card);
font-family: var(--hc-font-display);
transition: transform var(--hc-duration-medium) var(--hc-ease-playful);
}Palette
Hack Club's brand colours, from our brand guide. These stay the same in light and dark mode.
--hc-red#ec3750--hc-orange#ff8c37--hc-yellow#f1c40f--hc-green#33d6a6--hc-cyan#5bc0de--hc-blue#338eda--hc-purple#a633d6--hc-gray#8492a6Neutrals & accessible reds
Brand red is only 4.0:1 on white. For text smaller than 24px, use --hc-red-text, which switches between red-dark and red-light with the colour scheme.
--hc-ink#17171d--hc-ink2#2e1719--hc-black#000000--hc-paper#ffffff--hc-cream#fff6eb--hc-red-dark#be1e3a--hc-red-light#ff5c72Light & dark
Semantic colours change with the colour scheme. Use these for backgrounds, text and borders rather than raw palette values.
#ffffff#17171d#f9fafc#f1f2f5rgba(0, 0, 0, 0.08)rgba(23, 23, 29, 0.7)rgba(255, 255, 255, 0.82)#be1e3a#17171d#fff6eb#1f1f27#2a2a33rgba(255, 255, 255, 0.08)rgba(255, 246, 235, 0.7)rgba(23, 23, 29, 0.82)#ff5c72Typography
Headings use Zarathustra, a serif display face with a single weight (--hc-font-display). Everything else uses Phantom Sans (--hc-font-sans), in weights from 100 to 700 with italics. Body text is 20px.
--hc-text-display
clamp(3.25rem, 12vw, 5.625rem)--hc-text-title
clamp(2.2rem, 4vw, 3.4rem)--hc-text-heading
2.5rem--hc-text-xl
2rem--hc-text-lg
1.5rem--hc-text-body
1.25rem--hc-text-md
1.125rem--hc-text-sm
1rem--hc-text-xs
0.8remPhantom Sans weights
--hc-weight-thin
100--hc-weight-light
300--hc-weight-book
350--hc-weight-regular
400--hc-weight-medium
500--hc-weight-semibold
600--hc-weight-bold
700Line heights
--hc-leading-display | 0.92 |
--hc-leading-heading | 1 |
--hc-leading-snug | 1.2 |
--hc-leading-normal | 1.5 |
--hc-leading-prose | 1.7 |
Spacing
Keyed by multiples of 4px, like Tailwind: --hc-space-4 is 16px.
--hc-space-0 | 0 |
--hc-space-1 | 4px |
--hc-space-2 | 8px |
--hc-space-3 | 12px |
--hc-space-4 | 16px |
--hc-space-5 | 20px |
--hc-space-6 | 24px |
--hc-space-8 | 32px |
--hc-space-10 | 40px |
--hc-space-12 | 48px |
--hc-space-16 | 64px |
--hc-space-20 | 80px |
--hc-space-32 | 128px |
Rounding
hackclub.com rounds generously: buttons and inputs are pills, and cards use 16px.
--hc-radius-sm6px
--hc-radius-md8px
--hc-radius-photo10px
--hc-radius-lg12px
--hc-radius-card16px
--hc-radius-xl24px
--hc-radius-2xl28px
--hc-radius-pill9999px
Shadows
--hc-shadow-card--hc-shadow-raised--hc-shadow-photo--hc-shadow-pill--hc-shadow-glow--hc-shadow-offset--hc-shadow-sticker--hc-shadow-sticker-hover--hc-shadow-focus--hc-shadow-popoverUse sticker and sticker-hover with filter: drop-shadow() on cut-out images.
Gradients
--hc-gradient-brand--hc-gradient-brand-deep--hc-gradient-rainbow--hc-gradient-ink--hc-gradient-red-washMotion
Navigation uses a snappy ease-out; photos and stickers use a gentler, playful curve. Every component turns off its animations when the visitor prefers reduced motion.
--hc-ease-out | cubic-bezier(0.23, 1, 0.32, 1) |
--hc-ease-playful | cubic-bezier(0.25, 0.46, 0.45, 0.94) |
--hc-ease-standard | ease |
--hc-duration-fast | 150ms |
--hc-duration-base | 200ms |
--hc-duration-medium | 300ms |
--hc-duration-slow | 400ms |
Layout & breakpoints
--hc-max-width | 1200px |
--hc-prose-width | 800px |
--hc-nav-height | 80px |
--hc-gutter | clamp(16px, 6vw, 80px) |
--hc-section-y | clamp(80px, 12vw, 160px) |
CSS can't use custom properties in media queries, so breakpoints are available in JavaScript and in the Tailwind theme only:
breakpoints.sm | 640px |
breakpoints.md | 768px |
breakpoints.lg | 1024px |
breakpoints.xl | 1200px |