Skip to main content

Design Tokens

All visual decisions in GospeLib are expressed as semantic tokens defined in packages/ui/src/tokens/index.ts. Tokens are the single source of truth — Figma libraries, CSS custom properties, and React Native StyleSheet values are all derived from this canonical definition.

Color Tokens

Primary Palette

Scale50100200300400500600700800900
Navy
#EEF2F7#D4DFE9#A9BFD3#7E9FBD#5A80A8#3D5A7A#2E4560#1F3046#121D2B#080E15
Tan
#FAF7F3#F2EDE4#E4D9C9#D5C4AD#C4A882#B08E66#8C6E4B#6A5238#473826#251D13
White
#FFFFFF#FAF9F6#F5F3EE#EBE8E1#DDD9D0#CCCAC0#B5B2A7#999690#7A7870#575550

Typography Tokens

TokenValueUsage
font.family.scriptureGentiumPlusScripture text body
font.family.uiInterUI chrome, labels
font.family.hebrewSBLHebrewHebrew text (RTL)
font.family.greekGentiumPlusGreek text
font.size.xs11Strong's badges, metadata chips
font.size.sm13Secondary labels, captions
font.size.base16UI body text
font.size.md18Default scripture text
font.size.lg20Large scripture, section headers
font.size.xl24Screen titles
font.size.2xl30Marketing headings
font.size.3xl38Hero headings
font.lineHeight.tight1.3Headings
font.lineHeight.normal1.5UI text
font.lineHeight.reading1.6Default scripture reading
font.lineHeight.loose2.0Hebrew (cantillation marks)
font.weight.regular400Body text
font.weight.medium500Emphasized labels
font.weight.semibold600Section headings
font.weight.bold700Strong emphasis

Spacing Scale

TokenValue (px)Usage
space.14Tight internal padding
space.28Standard internal padding
space.312Small gaps
space.416Standard gaps, card padding
space.520Phone horizontal margin
space.624Section spacing
space.832Large section spacing
space.1040Tablet horizontal margin
space.1248Web vertical margin
space.1664Major section breaks

Border Radius

TokenValue (px)Usage
radius.xs2Micro elements
radius.sm4Chips, badges, small controls
radius.md8Buttons, inputs, chrome panels
radius.lg12Cards, note cards, paper surfaces
radius.xl16Bottom sheets (top corners only)
radius.full9999Pills, avatars, FABs

Elevation (Shadows)

LevelBox ShadowUsage
0noneBackground (page itself)
10 1px 3px rgba(20,16,10,0.08), 0 1px 2px rgba(20,16,10,0.06)Resting cards, inline panels
20 3px 8px rgba(20,16,10,0.10), 0 2px 4px rgba(20,16,10,0.07)Raised cards, hover states
30 6px 16px rgba(20,16,10,0.12), 0 3px 6px rgba(20,16,10,0.08)Floating panels, bottom sheets
40 12px 32px rgba(20,16,10,0.14), 0 4px 8px rgba(20,16,10,0.09)Popovers, command palette
50 20px 48px rgba(20,16,10,0.18), 0 6px 12px rgba(20,16,10,0.10)Modal dialogs

Shadow colors use warm near-black rgba(20,16,10) — never pure black.

Motion Tokens

TokenValueUsage
motion.easing.springcubic-bezier(0.34, 1.56, 0.64, 1)Micro-interactions, active states
motion.easing.smoothInOutcubic-bezier(0.4, 0, 0.2, 1)Panel transitions
motion.easing.deceleratecubic-bezier(0.0, 0.0, 0.2, 1)Elements entering screen
motion.easing.acceleratecubic-bezier(0.4, 0.0, 1, 1)Elements leaving screen
motion.duration.instant80msContent reveals, lexicon bubbles
motion.duration.fast120msState changes, highlights
motion.duration.standard220msPanel slides, tab transitions
motion.duration.deliberate350msConstellation zoom, full-screen
motion.duration.slow500msOnboarding animations

Layout Tokens

TokenValue (px)Usage
layout.readerMaxWidth680Max-width for scripture text column (web)
layout.phoneMargin20Horizontal margin on phone
layout.tabletMargin40Horizontal margin on tablet
layout.gutterStandard12Annotation gutter in standard mode
layout.gutterStudyMode56Annotation gutter in study mode
layout.contextPanelWidth360Right-side context panel (tablet/web)
layout.sideRailCollapsed60Side rail icon-only width
layout.sideRailExpanded220Side rail with labels
layout.bottomTabBarHeight56Tab bar height
layout.touchTargetMin44Minimum touch target size

Density Tokens

ModeLine HeightParagraph SpacingFont Size Delta
Spacious1.850.9em+2px (→ 20px)
Comfortable1.60.5em0 (→ 18px)
Compact1.450.25em-3px (→ 15px)

Platform Export

Tokens are the source of truth in TypeScript. Export targets:

PlatformFormatGenerated By
Web (CSS)CSS Custom PropertiesBuild step
React NativeStyleSheet constantsDirect import
iOS (Swift)Swift enumtokens-to-swift.js
FigmaFigma Variablestokens-to-figma.js