Repository Public
1# SP Vault Design System23The 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/`.45## Principles671. **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.82. **One accent.** Electric blue marks what can be acted on or what is selected. Status colours (green, amber, red) appear only on status.93. **Depth from light, not decoration.** Surfaces are separated by hairlines and two-layer shadows. No decorative gradients, no glow.104. **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.1112## Colour (`SP.Palette`)1314| Token | Dark | Light | Use |15|---|---|---|---|16| `obsidian` | `#05070C` | `#F3F4F7` | Deepest background |17| `midnight` | `#0A1222` | `#E6EAF2` | Top of the background gradient |18| `surface` / `surfaceHigh` | `#101827` / `#172135` | `#FFFFFF` | Panels, fields |19| `hairline` / `hairlineStrong` | white 9 % / 18 % | ink 10 % / 18 % | Rules, borders |20| `titanium` | `#9299A5` | `#6A717C` | Eyebrows, icons, secondary structure |21| `silver` | `#CDD2DA` | `#3C434E` | Metallic highlights |22| `electric` / `electricDeep` | `#3B86FF` / `#1E5FE6` | `#1B5CE0` / `#1447B8` | Accent, primary action |23| `textPrimary` / `Secondary` / `Tertiary` | `#F2F4F8` at 100 / 62 / 38 % | `#0A0F1A` at 100 / 62 / 40 % | Text |24| `positive` / `warning` / `critical` | `#3DD6A3` / `#F2B45A` / `#FF6B62` | `#12805C` / `#A86400` / `#C2302B` | Status only |2526Dark mode is the reference; light mode is porcelain and ink with the same accent.2728## Space, shape, type2930- **Spacing** (`SP.Space`): 4 · 8 · 12 · 16 · 20 · 24 · 32 · 44. Page margin 20.31- **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).32- **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.3334## Materials3536- `VaultBackground` — midnight falling to obsidian, one cold light from above, faint architectural rule lines that fade out.37- `spPanel()` — raised surface: vertical surface gradient, hairline edge lit from the top, two-layer shadow.38- `spGlass()` — Liquid Glass (`glassEffect`) for floating controls: header buttons, card controls, the tab bar (system).39- `brushedMetal` shader — fine horizontal grain for titanium tiles (`IconBadge`).4041## The card (`Engines/VirtualCard`)4243| Mode | What is drawn |44|---|---|45| Original | The photograph, a hairline edge, a light shadow |46| 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 |47| Privacy | The photograph blurred beyond reading, with the name, the issuer and the last four characters |48| Full screen | The card alone on black, turned a quarter turn if it is landscape, with pinch, pan and double-tap zoom |4950The flip is a 3D rotation about the vertical axis with a slight lift at mid-turn; the face turned away is hidden past 90°.5152## Components5354`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`.5556## Motion and haptics5758- `SP.Motion.card` (spring 0.52 / 0.84) opens and closes; `flip` (0.62 / 0.78); `quick` for presses and chips.59- Cards open with the system zoom transition from their place in the wallet.60- `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.61- `CADisableMinimumFrameDurationOnPhone` is set, so animations run at up to 120 Hz on ProMotion displays.6263## Accessibility6465Reduce 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`.66