Design Principles
Three core principles guide every design decision in the Tungsten ecosystem. Like the language itself — no noise, just the algorithm.
Pseudocode That Ships
Every interface element should feel as natural as reading pseudocode in a notebook. If a user has to think about the UI instead of their work, we've failed. Reduce cognitive load ruthlessly — strip away every element that doesn't directly serve comprehension.
Warm Precision
Tungsten is named after an element that glows when heated. Our interfaces balance scientific precision with approachable warmth. We use monospaced type for code and data, but pair it with a serif display face that feels human. Colors are warm but never garish — the amber glow of a filament, not a neon sign.
Density by Choice
Scientists and programmers need information density. Our system supports high-density layouts without sacrificing readability. Every spacing decision, every type size, every component variant exists to let users control how much they see.
Color System
Inspired by the warm glow of heated tungsten filaments. A dark-first palette that reduces eye strain for long coding sessions.
Primary Palette
Semantic Colors
Color Usage Rules
| Rule | Guidance |
|---|---|
| Tungsten amber | Only for primary actions and brand marks. Never for large background fills. |
| Cobalt blue | Reserved for links and focus indicators only. |
| Semantic colors | Always pair with matching background tint. Never use error-red for decoration. |
| Contrast ratios | Text on Carbon: minimum 4.5:1 (AA). Large text: 3:1. Interactive: 3:1. |
| Dark mode default | Tungsten is dark-first. Light mode uses Paper (#F2F1EE) as base. |
Typography
Three fonts: Fraunces for warmth, DM Sans for clarity, JetBrains Mono for code. Together they embody "warm precision."
Font Families
| Role | Family | Usage |
|---|---|---|
| Display | Fraunces — Variable serif | Headlines, hero text, section titles |
| Body | DM Sans — Geometric sans | Paragraphs, UI labels, buttons, navigation |
| Code | JetBrains Mono — Monospace | Code blocks, tokens, data values, specs |
Type Scale
Responsive Type
| Style | Desktop (1440) | Tablet (768) | Mobile (375) |
|---|---|---|---|
| Display | 48/52 | 38/42 | 30/36 |
| Headline | 32/38 | 28/34 | 24/30 |
| Body | 16/26 | 16/26 | 15/24 |
| Code | 14/22 | 14/22 | 13/20 |
Layout & Grid
A responsive 12-column grid built on an 8px spatial unit.
12-Column Grid
| Breakpoint | Width | Columns | Gutter | Margin |
|---|---|---|---|---|
| Desktop XL | ≥ 1440px | 12 | 24px | 80px |
| Desktop | 1024–1439 | 12 | 24px | 48px |
| Tablet | 768–1023 | 8 | 16px | 32px |
| Mobile | 375–767 | 4 | 16px | 16px |
Breakpoint Tokens
| Token | Value | Usage |
|---|---|---|
--bp-sm | 375px | Small phones |
--bp-md | 768px | Tablets |
--bp-lg | 1024px | Laptops |
--bp-xl | 1440px | Large displays |
--bp-xxl | 1920px | Ultra-wide |
Safe Areas
For notched devices, respect env(safe-area-inset-*). Tab bars should include padding-bottom: max(16px, env(safe-area-inset-bottom)).
Spacing System
An 8px base unit produces a harmonious spatial rhythm. Each step has a defined semantic use.
Scale
space-1 4pxspace-2 8pxspace-3 12pxspace-4 16pxspace-5 24pxspace-6 32pxspace-7 48pxspace-8 64pxspace-9 96pxspace-10 128pxUse only these 10 values. Do not introduce arbitrary spacing.
Component Library
30+ components with live previews. Every component supports default, hover, active, disabled, loading, and error states.
Navigation
Tab Bar
Breadcrumbs
Sidebar Navigation
Header / Nav Bar
Input Controls
Buttons
Text Fields
Dropdown / Select
Toggle Switch
Checkbox
Radio Button
Slider / Range
Feedback
Alert / Banner
Toast
Delete Module?
This will permanently remove math_utils.w and all dependents.
Modal / Dialog
Progress Indicators
Skeleton Screen
Data Display
Card
| Module | Version | Status |
|---|---|---|
| core | 1.0.0 | stable |
| math | 2.3.1 | beta |
Table
Stat Display
List
Media & Identity
Avatar
Image Container
Badge / Tag
Video Player
Accessibility (All Components)
| Requirement | Implementation |
|---|---|
| Focus indicators | box-shadow: 0 0 0 3px rgba(232,160,32,0.4) on :focus-visible |
| Keyboard nav | Full Tab support. Arrows within composites. Esc closes overlays. |
| ARIA | Icon buttons: aria-label. Toggles: role="switch". Modals: role="dialog" aria-modal="true". |
| Motion | Respect prefers-reduced-motion: reduce. |
| Color independence | Icons + text labels always accompany semantic colors. |
Page Patterns & Flows
Reusable page templates and interaction patterns for Tungsten interfaces.
Page Templates
Landing Page
Hero with code example, feature grid (3-col), comparison table, CTA section. Maximum visual impact.
Dashboard
Sidebar nav + content. Top stat row (4 cards), activity feed, quick actions panel.
Documentation
Three-column: sidebar TOC, main content, right mini-nav. Search via ⌘K command palette.
Settings
Vertical tabs left, forms right. Group under Title 2 headers. Save via toast confirmation.
Package Profile
Header with icon + metadata, tabbed content below (README, versions, deps, stats).
User Flows
Onboarding
3-step progressive: Install → Create file → Run. Each shows terminal command + expected output.
Authentication
Email-first flow. Single input per step. Magic link preferred, password fallback.
Search
Command palette (⌘K). Instant type-ahead. Results grouped: Packages, Docs, API.
Empty States
Illustration/icon + heading + action button. Use Tungsten code snippets as examples.
Feedback Patterns
| Pattern | Component | Behavior |
|---|---|---|
| Success | Toast (top-right) | Auto-dismiss 4s. Green dot. Optional undo. |
| Error | Inline Alert + Toast | Inline persists until fixed. Toast for system errors (8s). |
| Loading | Skeleton → Content | Skeleton immediately. 200ms fade transition. Progress bar if >3s. |
| Empty | Empty State Card | Centered illustration, heading, description, primary action. |
Design Tokens
Complete token structure in JSON for CSS custom properties, Tailwind, or native platforms.
Do's & Don'ts
Guidelines to keep implementations consistent across the Tungsten ecosystem.
Implementation
How to integrate the Tungsten Design System into your project.
Quick Start
CSS Custom Properties
Tailwind Config
Component Specs
| Component | Padding | Radius | Font | Shadow |
|---|---|---|---|---|
| Button | 8px 16px | 6px | DM Sans 600 / 0.82rem | none |
| Button (lg) | 12px 24px | 6px | DM Sans 600 / 0.95rem | none |
| Input | 8px 12px | 6px | DM Sans 400 / 0.85rem | focus: glow |
| Card | 16px | 10px | Mixed | hover: shadow-md |
| Alert | 12px 16px | 6px | DM Sans 500 / 0.8rem | none |
| Toast | 12px 16px | 10px | DM Sans 400 / 0.8rem | shadow-lg |
| Modal | 24px | 16px | Mixed | shadow-lg |
| Badge | 2px 8px | full | JetBrains Mono 700 / 0.62rem | none |
Accessibility Checklist
| Check | Requirement |
|---|---|
| Contrast | WCAG 2.1 AA (4.5:1 normal, 3:1 large). Use pre-validated tokens. |
| Focus | Modals trap focus. Dropdowns return on close. Logical tab order. |
| Screen readers | All images: alt text. Icon buttons: aria-label. Toasts: live regions. |
| Keyboard | All interactive via Tab. Esc closes overlays. Enter/Space activates. |
| Motion | Wrap in @media (prefers-reduced-motion: no-preference). |
| Touch | Minimum 44×44px targets on mobile. |