SPB Git

Repository Public

DESIGN_SYSTEM.md 4.7 KB

# SP Vault Design System

The interface should feel like a well-made object: mineral, quiet, precise. Cards are the only colourful things on screen; everything around them recedes. Source: SPVault/DesignSystem/.

# Principles

  1. The card is the photograph. A virtual card is the corrected photograph of the real one, at its true proportions, with the corner radius of its format. Effects add light on top; they never change what is printed on the card.
  2. One accent. Electric blue marks what can be acted on or what is selected. Status colours (green, amber, red) appear only on status.
  3. Depth from light, not decoration. Surfaces are separated by hairlines and two-layer shadows. No decorative gradients, no glow.
  4. Motion explains. A card opens from where it was, turns over like a card, and the vault closes with weight. Under Reduce Motion every movement becomes a cross-fade.

# Colour (SP.Palette)

Token Dark Light Use
obsidian #05070C #F3F4F7 Deepest background
midnight #0A1222 #E6EAF2 Top of the background gradient
surface / surfaceHigh #101827 / #172135 #FFFFFF Panels, fields
hairline / hairlineStrong white 9 % / 18 % ink 10 % / 18 % Rules, borders
titanium #9299A5 #6A717C Eyebrows, icons, secondary structure
silver #CDD2DA #3C434E Metallic highlights
electric / electricDeep #3B86FF / #1E5FE6 #1B5CE0 / #1447B8 Accent, primary action
textPrimary / Secondary / Tertiary #F2F4F8 at 100 / 62 / 38 % #0A0F1A at 100 / 62 / 40 % Text
positive / warning / critical #3DD6A3 / #F2B45A / #FF6B62 #12805C / #A86400 / #C2302B Status only

Dark mode is the reference; light mode is porcelain and ink with the same accent.

# Space, shape, type

  • Spacing (SP.Space): 4 · 8 · 12 · 16 · 20 · 24 · 32 · 44. Page margin 20.
  • Radii (SP.Radius): 10 (fields) · 16 (buttons, small panels) · 22 (panels) · 30. Always continuous corners. A card's radius is a fraction of its width (ID-1: 3.18 mm of 85.60 mm).
  • Typography: SF Pro only. Display and titles use the expanded width (spDisplay 32, spTitle 22) for an engraved tone; eyebrows are 11 pt expanded capitals tracked 1.6; body 16, callout 15, caption 13. Numbers are monospaced (spNumber, spMetric) so they never shift.

# Materials

  • VaultBackground — midnight falling to obsidian, one cold light from above, faint architectural rule lines that fade out.
  • spPanel() — raised surface: vertical surface gradient, hairline edge lit from the top, two-layer shadow.
  • spGlass() — Liquid Glass (glassEffect) for floating controls: header buttons, card controls, the tab bar (system).
  • brushedMetal shader — fine horizontal grain for titanium tiles (IconBadge).

# The card (Engines/VirtualCard)

Mode What is drawn
Original The photograph, a hairline edge, a light shadow
Premium The photograph + cardSheen (Metal): a soft specular band and a faint interference film that follow the device tilt (Core Motion) or a drag, a bevel lit from the top, a deeper shadow that shifts with the tilt
Privacy The photograph blurred beyond reading, with the name, the issuer and the last four characters
Full screen The card alone on black, turned a quarter turn if it is landscape, with pinch, pan and double-tap zoom

The flip is a 3D rotation about the vertical axis with a slight lift at mid-turn; the face turned away is hidden past 90°.

# Components

PageHeader, SectionHeader, DetailRow, Hairline, IconBadge, StatusPill, SPButtonStyle (primary, secondary, quiet, destructive), GlassIconButton, SPTextField, EmptyStateView, VaultMark (the vault door holding a card, with an openness parameter used by the lock animation), CardRowView.

# Motion and haptics

  • SP.Motion.card (spring 0.52 / 0.84) opens and closes; flip (0.62 / 0.78); quick for presses and chips.
  • Cards open with the system zoom transition from their place in the wallet.
  • Haptics (Core Haptics) has a composed pattern for each event — unlock (bolts, then release), lock (door, then bolt), flip, lift, drop, capture — with UIKit feedback as fallback. Haptics can be turned off in Settings.
  • CADisableMinimumFrameDurationOnPhone is set, so animations run at up to 120 Hz on ProMotion displays.

# Accessibility

Reduce Motion replaces rotation, parallax and scaling with cross-fades and stops Core Motion updates. Cards expose a VoiceOver label (name, issuer, last four) and a "show back" action. Status is never carried by colour alone: pills carry text. Sensitive text is marked privacySensitive.

Files main
Menu

Theme