@deriv-ds/design-intelligence-layer 0.4.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -0
- package/dist/index.cjs +8159 -4505
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +478 -155
- package/dist/index.d.ts +478 -155
- package/dist/index.js +6991 -2804
- package/dist/index.js.map +1 -1
- package/guides/design-principles/quill-design-principles.md +138 -0
- package/guides/design-system-guide/deriv-design-intelligence-guide.md +30 -2
- package/guides/design-system-guide/icon-reference.md +24 -24
- package/package.json +11 -10
- package/public/assets/icon-cfds.png +0 -0
- package/public/assets/icon-more.png +0 -0
- package/public/assets/icon-setup-profile.png +0 -0
- package/public/assets/logo-deriv-x.png +0 -0
- package/public/assets/no-transaction.png +0 -0
- package/src/styles.css +35 -0
- package/guides/design-principles/trading-game-design-principles.md +0 -98
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Quill Design Principles
|
|
2
|
+
|
|
3
|
+
> Decision framework for AI agents and developers generating UI for Deriv products.
|
|
4
|
+
> Version 1.0 · May 2026
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Context
|
|
9
|
+
|
|
10
|
+
Deriv = online trading platform (CFDs, options, crypto exchange). Users: Global South, mostly mobile, lower-end Android, variable networks, beginner-to-expert range. Multiple products share one design system (Quill) and one brand voice.
|
|
11
|
+
|
|
12
|
+
**Core tension:** Powerful enough for experienced traders ↔ accessible enough for someone on a low-end device making their first trade.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Principles (priority order — higher wins on conflict)
|
|
17
|
+
|
|
18
|
+
### P1: Be honest before being persuasive
|
|
19
|
+
- Financial data (balances, prices, payouts, leverage, risk) = always clear, accurate, unambiguous
|
|
20
|
+
- Risk info in plain language with concrete numbers — no marketing spin, no legal walls
|
|
21
|
+
- Serious information gets serious treatment — no playful styling on financial data
|
|
22
|
+
- ✅ "You could lose more than your deposit" with specific multiplier shown
|
|
23
|
+
- ❌ "Unlock 1000x leverage!" · ❌ Animated account balances · ❌ Playful tone on money screens
|
|
24
|
+
|
|
25
|
+
### P2: Lead with the decision, not the data
|
|
26
|
+
- One primary action + one key supporting info per screen
|
|
27
|
+
- Progressive disclosure: one tap away, never zero taps overwhelmed
|
|
28
|
+
- Next step visually obvious without instructions
|
|
29
|
+
- ✅ Trade form starts essential, expands for advanced params
|
|
30
|
+
- ❌ All parameters shown at equal weight · ❌ 8+ fields visible at once · ❌ Info icons compensating for bad layout
|
|
31
|
+
|
|
32
|
+
### P3: Design every state, not just the happy path
|
|
33
|
+
- Every component handles 5 states: **empty, loading, partial, error, ideal**
|
|
34
|
+
- Loading = skeleton screens (no raw spinners, no blank screens)
|
|
35
|
+
- Error structure: what happened → why → what user can do next
|
|
36
|
+
- Empty states guide toward action, never dead ends
|
|
37
|
+
- ✅ Skeleton matching content layout · ✅ "Couldn't load history. Tap to retry."
|
|
38
|
+
- ❌ Raw spinner · ❌ Blank screen · ❌ "Something went wrong" with no recovery
|
|
39
|
+
|
|
40
|
+
### P4: Design for the smallest screen first
|
|
41
|
+
- Mobile-first, then expand to desktop — never the reverse
|
|
42
|
+
- Minimum tap targets: 44×44pt
|
|
43
|
+
- Thumb-zone ergonomics for spacing
|
|
44
|
+
- Performance = design decision: cache, prefetch, lazy-load, always show loading feedback
|
|
45
|
+
- ✅ Design mobile layout first, test on mid-range Android
|
|
46
|
+
- ❌ Desktop Figma frame adapted by shrinking · ❌ Hover-dependent patterns · ❌ Animations that stutter on low-end devices
|
|
47
|
+
|
|
48
|
+
### P5: Write in one voice, everywhere
|
|
49
|
+
- **British English · Sentence case · Active voice · Plain language**
|
|
50
|
+
- Error format: what happened → why → what to do next
|
|
51
|
+
- Tone scales with stakes: money/risk = direct and neutral; progress/onboarding = warmer
|
|
52
|
+
- Written for global, non-native-English-speaking audience — no idioms, no culturally specific metaphors
|
|
53
|
+
- ✅ "Your withdrawal is being processed" · ✅ "Deposit successful"
|
|
54
|
+
- ❌ "Withdrawal Is Being Processed" · ❌ "An error has occurred" · ❌ Mixing "colour"/"color"
|
|
55
|
+
|
|
56
|
+
### P6: Reuse before you reinvent
|
|
57
|
+
- Use existing Quill/Shadcn pattern before creating new ones
|
|
58
|
+
- Decision tree: Shadcn component → extend with Quill variant → Radix primitive → custom (last resort)
|
|
59
|
+
- Same action type = same screen position across flows
|
|
60
|
+
- Same element type = same animation/behaviour everywhere
|
|
61
|
+
- ✅ Extend existing component with new variant
|
|
62
|
+
- ❌ Unique layout per screen · ❌ Custom component when Shadcn equivalent exists · ❌ CTA position moving between screens
|
|
63
|
+
|
|
64
|
+
### P7: Educate in context, not in advance
|
|
65
|
+
- Just-in-time guidance at point of decision, not front-loaded onboarding
|
|
66
|
+
- Progressive disclosure serves both novices (guidance) and experts (speed)
|
|
67
|
+
- Content must be translatable — no idioms
|
|
68
|
+
- ✅ Inline explanation of "Stop Loss" when user first encounters the field
|
|
69
|
+
- ❌ 5-screen onboarding tutorial · ❌ Assuming users know "pip" or "lot size"
|
|
70
|
+
|
|
71
|
+
### P8: Measure journeys, not just screens
|
|
72
|
+
- No design change ships on a single metric in isolation
|
|
73
|
+
- Evaluate against end-to-end user journey
|
|
74
|
+
- Local win that degrades overall flow = not a win
|
|
75
|
+
- ✅ Measure deposit redesign by full intent-to-first-trade journey
|
|
76
|
+
- ❌ Optimising one step without checking downstream friction
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Quick defaults
|
|
81
|
+
|
|
82
|
+
| Unsure about... | Default to... |
|
|
83
|
+
|---|---|
|
|
84
|
+
| More info vs. less | Less — disclose progressively |
|
|
85
|
+
| New pattern vs. existing | Existing — consistency beats novelty |
|
|
86
|
+
| Desktop-first vs. mobile-first | Mobile-first |
|
|
87
|
+
| Playful vs. serious tone | Match the stakes |
|
|
88
|
+
| More decoration vs. less | Less — earn every element |
|
|
89
|
+
| Assume knowledge vs. explain | Explain — in context, at moment of need |
|
|
90
|
+
| Marketing language vs. plain | Plain — especially for risk/money |
|
|
91
|
+
| One screen vs. the journey | The journey |
|
|
92
|
+
| British vs. American English | British — always |
|
|
93
|
+
| Title Case vs. sentence case | Sentence case — always |
|
|
94
|
+
| Custom build vs. Shadcn/Quill | Shadcn/Quill first |
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Failure modes checklist
|
|
99
|
+
|
|
100
|
+
Before shipping, verify your output doesn't match these anti-patterns:
|
|
101
|
+
|
|
102
|
+
| # | Anti-pattern | Fix |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| 1 | **Information overload** — all data shown at equal weight | P2: Lead with the decision |
|
|
105
|
+
| 2 | **Inconsistent copy** — mixed case, mixed English, vague errors | P5: One voice everywhere |
|
|
106
|
+
| 3 | **Happy-path-only** — no loading/empty/error states designed | P3: Design every state |
|
|
107
|
+
| 4 | **Risk as marketing or legalese** — hype or boilerplate, neither helpful | P1: Honest before persuasive |
|
|
108
|
+
| 5 | **Desktop-first afterthought** — cramped mobile, undersized targets | P4: Smallest screen first |
|
|
109
|
+
| 6 | **Pattern fragmentation** — new components when existing ones work | P6: Reuse before reinvent |
|
|
110
|
+
| 7 | **Metric tunnel vision** — optimising one step, breaking the journey | P8: Measure journeys |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Pre-completion checklist
|
|
115
|
+
|
|
116
|
+
- [ ] Primary action and key info immediately obvious?
|
|
117
|
+
- [ ] Trustworthy with real money?
|
|
118
|
+
- [ ] All 5 states designed (empty, loading, partial, error, ideal)?
|
|
119
|
+
- [ ] Works on mid-range mobile + slow connection?
|
|
120
|
+
- [ ] Copy: British English, sentence case, active voice?
|
|
121
|
+
- [ ] Risk/financial info in plain, honest language?
|
|
122
|
+
- [ ] Reused existing Quill/Shadcn pattern first?
|
|
123
|
+
- [ ] Clear forward path — no dead ends?
|
|
124
|
+
- [ ] First-time trader can understand without prior knowledge?
|
|
125
|
+
- [ ] Serves the broader journey, not just this screen's metric?
|
|
126
|
+
- [ ] Content translatable — no idioms or cultural references?
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Mapping to Quill UX pillars
|
|
131
|
+
|
|
132
|
+
| Quill pillar | Principles |
|
|
133
|
+
|---|---|
|
|
134
|
+
| Simplicity & Purpose | P2, P7 |
|
|
135
|
+
| Stay Consistent | P5, P6 |
|
|
136
|
+
| Design for Everyone | P1, P3, P4 |
|
|
137
|
+
|
|
138
|
+
Foundation: Deriv values (Integrity, Customer Focus, Competence, Teamwork) sit above all principles.
|
|
@@ -584,8 +584,7 @@ These are styling behaviors you can't discover from TypeScript types alone:
|
|
|
584
584
|
## 8.5 — Blocks Catalogue
|
|
585
585
|
|
|
586
586
|
> Blocks are fully composed UI sections built from design system primitives. They appear in the **Blocks** tab of the playground.
|
|
587
|
-
> - Blocks are
|
|
588
|
-
> - To build them in a consuming project, import the underlying components (`Button`, etc.) from `@deriv-ds/design-intelligence-layer` and compose them manually using design tokens only.
|
|
587
|
+
> - Blocks **are exported** from the npm package — import them by name from `@deriv-ds/design-intelligence-layer` (e.g. `import { Navbar, Section } from "@deriv-ds/design-intelligence-layer"`). When a user asks for a block by name, import it directly instead of recreating it.
|
|
589
588
|
> - Do NOT mistake a Block for a component — it will not appear in Rule 1's component list.
|
|
590
589
|
|
|
591
590
|
### NavBar
|
|
@@ -620,6 +619,35 @@ Landing page hero sections in multiple layout types.
|
|
|
620
619
|
|
|
621
620
|
---
|
|
622
621
|
|
|
622
|
+
### Section
|
|
623
|
+
|
|
624
|
+
A section header pattern: an eyebrow tag, a title with an optional trailing chevron, an optional right-aligned control cluster, a description, an optional full-width segmented control, and a content slot for the section body.
|
|
625
|
+
|
|
626
|
+
```tsx
|
|
627
|
+
import { Section } from "@deriv-ds/design-intelligence-layer"
|
|
628
|
+
|
|
629
|
+
<Section
|
|
630
|
+
title="Markets"
|
|
631
|
+
description="Pick a market to start trading"
|
|
632
|
+
titleSize="titleLg" // titleLg | titleMd | titleSm | titleCaption | loading
|
|
633
|
+
showTag tag={{ label: "New" }}
|
|
634
|
+
showTitle showChevron
|
|
635
|
+
showControlSection showButton buttonLabel="See all" showNavigation
|
|
636
|
+
showDescription
|
|
637
|
+
showSegmentedControl segments={["All", "Favourites"]}
|
|
638
|
+
>
|
|
639
|
+
{/* section content */}
|
|
640
|
+
</Section>
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
**Props:** `title`, `description`, `titleSize`, `showTag` + `tag`, `showTitle`, `showChevron` + `onTitleClick`, `showControlSection`, `showButton` + `buttonLabel` + `onButtonClick`, `showNavigation` + `onPrev`/`onNext`, `controlSegments`, `showDescription`, `showSegmentedControl` + `segments` + `value`/`onValueChange`, `children`. All flags default off except `showTitle`; `titleSize="loading"` renders a skeleton title.
|
|
644
|
+
|
|
645
|
+
**Components used:** `Tag` (`outline-neutral`, size `2xs`), `Icon` (`chevron-left`/`chevron-right`), `SegmentedControl`, `Skeleton`
|
|
646
|
+
|
|
647
|
+
**Tokens used:** `bg-primary-surface`, `text-prominent`, `text-subtle`, `--background-default-opacity-default`, `--background-hover-default`, `body-md`, `rounded-2xl`, `rounded-full`
|
|
648
|
+
|
|
649
|
+
---
|
|
650
|
+
|
|
623
651
|
## 9 — Common Mistakes
|
|
624
652
|
|
|
625
653
|
| Mistake | Correct Approach |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- AUTO-GENERATED by scripts/generate-icon-reference.mjs — do not edit by hand.
|
|
2
|
-
Regenerate with: npm run
|
|
2
|
+
Regenerate with: npm run generate:icon-reference -->
|
|
3
3
|
|
|
4
|
-
# Icon reference —
|
|
4
|
+
# Icon reference — `@deriv/quill-icons` via `<Icon />`
|
|
5
5
|
|
|
6
6
|
The design system's only icon source. **Never install or import `lucide-react`** or any other icon library — every icon below ships with the package.
|
|
7
7
|
|
|
@@ -82,7 +82,7 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
82
82
|
| `bell` | ✓ | ✓ | ✓ |
|
|
83
83
|
| `book-circle-question` | ✓ | ✓ | ✓ |
|
|
84
84
|
| `book-open` | ✓ | ✓ | ✓ |
|
|
85
|
-
| `book-open-cover-circle-question` | ✓ | ✓ |
|
|
85
|
+
| `book-open-cover-circle-question` | ✓ | ✓ | ✓ |
|
|
86
86
|
| `box-archive-circle-arrow-down` | ✓ | ✓ | ✓ |
|
|
87
87
|
| `box-archive-circle-arrow-up` | ✓ | ✓ | ✓ |
|
|
88
88
|
| `brand-harmony-os` | — | ✓ | — |
|
|
@@ -94,12 +94,12 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
94
94
|
| `brand-microsoft-store` | — | ✓ | — |
|
|
95
95
|
| `brand-trustpilot` | — | ✓ | — |
|
|
96
96
|
| `calculator` | ✓ | ✓ | ✓ |
|
|
97
|
-
| `calendar-circle-arrow-left` | ✓ | ✓ |
|
|
98
|
-
| `calendar-circle-arrow-right` | ✓ | ✓ |
|
|
97
|
+
| `calendar-circle-arrow-left` | ✓ | ✓ | ✓ |
|
|
98
|
+
| `calendar-circle-arrow-right` | ✓ | ✓ | ✓ |
|
|
99
99
|
| `chart-bar` | ✓ | ✓ | ✓ |
|
|
100
100
|
| `chart-candlestick` | ✓ | ✓ | ✓ |
|
|
101
101
|
| `chart-line` | ✓ | ✓ | ✓ |
|
|
102
|
-
| `chart-line-clock` | ✓ | ✓ |
|
|
102
|
+
| `chart-line-clock` | ✓ | ✓ | ✓ |
|
|
103
103
|
| `chart-line-up-down-clock` | ✓ | ✓ | ✓ |
|
|
104
104
|
| `chart-tradingview` | ✓ | ✓ | ✓ |
|
|
105
105
|
| `chart-trend-down` | ✓ | ✓ | ✓ |
|
|
@@ -117,7 +117,7 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
117
117
|
| `circle-user-slash` | ✓ | ✓ | ✓ |
|
|
118
118
|
| `clock-rotate-left` | ✓ | ✓ | ✓ |
|
|
119
119
|
| `copy` | ✓ | ✓ | ✓ |
|
|
120
|
-
| `crosshairs-slash` | ✓ | ✓ |
|
|
120
|
+
| `crosshairs-slash` | ✓ | ✓ | ✓ |
|
|
121
121
|
| `deal-cancellation` | ✓ | ✓ | ✓ |
|
|
122
122
|
| `deal-protection` | ✓ | ✓ | ✓ |
|
|
123
123
|
| `deriv` | ✓ | ✓ | ✓ |
|
|
@@ -132,7 +132,7 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
132
132
|
| `fiat-onramp` | ✓ | ✓ | ✓ |
|
|
133
133
|
| `field-password` | ✓ | ✓ | ✓ |
|
|
134
134
|
| `file-lines` | ✓ | ✓ | ✓ |
|
|
135
|
-
| `file-lines-magnifying-glass` | ✓ | ✓ |
|
|
135
|
+
| `file-lines-magnifying-glass` | ✓ | ✓ | ✓ |
|
|
136
136
|
| `file-xmark` | ✓ | ✓ | ✓ |
|
|
137
137
|
| `fingerprint` | ✓ | ✓ | ✓ |
|
|
138
138
|
| `gear` | ✓ | ✓ | ✓ |
|
|
@@ -140,8 +140,8 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
140
140
|
| `hand-gesture-swipe-left-right` | ✓ | ✓ | ✓ |
|
|
141
141
|
| `hand-gesture-tap-left` | ✓ | ✓ | ✓ |
|
|
142
142
|
| `hand-gesture-tap-right` | ✓ | ✓ | ✓ |
|
|
143
|
-
| `handshake-lock` | ✓ | ✓ |
|
|
144
|
-
| `handshake-shield` | ✓ | ✓ |
|
|
143
|
+
| `handshake-lock` | ✓ | ✓ | ✓ |
|
|
144
|
+
| `handshake-shield` | ✓ | ✓ | ✓ |
|
|
145
145
|
| `horizontal-rule-dashed` | ✓ | ✓ | ✓ |
|
|
146
146
|
| `house` | ✓ | ✓ | ✓ |
|
|
147
147
|
| `house-blank` | ✓ | ✓ | ✓ |
|
|
@@ -149,7 +149,7 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
149
149
|
| `inbox` | ✓ | ✓ | ✓ |
|
|
150
150
|
| `lock-pattern` | ✓ | ✓ | ✓ |
|
|
151
151
|
| `magnifying-glass` | ✓ | ✓ | ✓ |
|
|
152
|
-
| `memo-shield` | ✓ | ✓ |
|
|
152
|
+
| `memo-shield` | ✓ | ✓ | ✓ |
|
|
153
153
|
| `minus` | ✓ | ✓ | ✓ |
|
|
154
154
|
| `mobile-notch-rotate` | ✓ | ✓ | ✓ |
|
|
155
155
|
| `moon` | ✓ | ✓ | ✓ |
|
|
@@ -157,22 +157,22 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
157
157
|
| `options` | ✓ | ✓ | ✓ |
|
|
158
158
|
| `page-circle-arrow-right` | ✓ | ✓ | ✓ |
|
|
159
159
|
| `passkey` | ✓ | ✓ | ✓ |
|
|
160
|
-
| `pen-field-circle-xmark` | ✓ | ✓ |
|
|
161
|
-
| `pen-field-lock` | ✓ | ✓ |
|
|
162
|
-
| `pen-field-slash` | ✓ | ✓ |
|
|
160
|
+
| `pen-field-circle-xmark` | ✓ | ✓ | ✓ |
|
|
161
|
+
| `pen-field-lock` | ✓ | ✓ | ✓ |
|
|
162
|
+
| `pen-field-slash` | ✓ | ✓ | ✓ |
|
|
163
163
|
| `phone` | ✓ | ✓ | ✓ |
|
|
164
164
|
| `playback-speed` | ✓ | ✓ | ✓ |
|
|
165
165
|
| `plus` | ✓ | ✓ | ✓ |
|
|
166
166
|
| `puzzles-piece-two` | ✓ | ✓ | ✓ |
|
|
167
|
-
| `quill` |
|
|
168
|
-
| `rectangle-history-circle-dollar` | ✓ | ✓ |
|
|
167
|
+
| `quill` | ✓ | ✓ | ✓ |
|
|
168
|
+
| `rectangle-history-circle-dollar` | ✓ | ✓ | ✓ |
|
|
169
169
|
| `right-from-bracket` | ✓ | ✓ | ✓ |
|
|
170
170
|
| `rotate-device` | ✓ | ✓ | ✓ |
|
|
171
171
|
| `rotate-right` | ✓ | ✓ | ✓ |
|
|
172
|
-
| `shield-circle-check` | ✓ | ✓ |
|
|
173
|
-
| `shield-halved-circle-minus` | ✓ | ✓ |
|
|
174
|
-
| `shield-halved-lock` | ✓ | ✓ |
|
|
175
|
-
| `shield-lock` | ✓ | ✓ |
|
|
172
|
+
| `shield-circle-check` | ✓ | ✓ | ✓ |
|
|
173
|
+
| `shield-halved-circle-minus` | ✓ | ✓ | ✓ |
|
|
174
|
+
| `shield-halved-lock` | ✓ | ✓ | ✓ |
|
|
175
|
+
| `shield-lock` | ✓ | ✓ | ✓ |
|
|
176
176
|
| `sparkles` | ✓ | ✓ | ✓ |
|
|
177
177
|
| `spinner` | ✓ | ✓ | ✓ |
|
|
178
178
|
| `square` | ✓ | ✓ | ✓ |
|
|
@@ -190,11 +190,11 @@ A "—" means that weight is not mapped for the icon; passing it falls back to t
|
|
|
190
190
|
| `user` | ✓ | ✓ | ✓ |
|
|
191
191
|
| `user-circle-arrow-right` | ✓ | ✓ | ✓ |
|
|
192
192
|
| `user-circle-arrow-up` | ✓ | ✓ | ✓ |
|
|
193
|
-
| `user-circle-dollar` | ✓ | ✓ |
|
|
194
|
-
| `user-large-circle-dollar` | ✓ | ✓ |
|
|
193
|
+
| `user-circle-dollar` | ✓ | ✓ | ✓ |
|
|
194
|
+
| `user-large-circle-dollar` | ✓ | ✓ | ✓ |
|
|
195
195
|
| `user-tie-circle-dollar` | ✓ | ✓ | ✓ |
|
|
196
|
-
| `users-line-circle-dollar` | ✓ | ✓ |
|
|
197
|
-
| `users-rectangle-circle-dollar` | ✓ | ✓ |
|
|
196
|
+
| `users-line-circle-dollar` | ✓ | ✓ | ✓ |
|
|
197
|
+
| `users-rectangle-circle-dollar` | ✓ | ✓ | ✓ |
|
|
198
198
|
| `wallet` | ✓ | ✓ | ✓ |
|
|
199
199
|
| `wallet-circle-minus` | ✓ | ✓ | ✓ |
|
|
200
200
|
| `wallet-circle-plus` | ✓ | ✓ | ✓ |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deriv-ds/design-intelligence-layer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Deriv Design System — shadcn/ui components with Tailwind CSS v4",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
"dist/",
|
|
38
38
|
"src/styles.css",
|
|
39
39
|
"guides/",
|
|
40
|
+
"public/assets/no-transaction.png",
|
|
41
|
+
"public/assets/icon-cfds.png",
|
|
42
|
+
"public/assets/icon-setup-profile.png",
|
|
43
|
+
"public/assets/icon-more.png",
|
|
44
|
+
"public/assets/logo-deriv-x.png",
|
|
40
45
|
"AGENTS.md",
|
|
41
46
|
"README.md"
|
|
42
47
|
],
|
|
@@ -46,14 +51,8 @@
|
|
|
46
51
|
"tailwindcss": ">=4"
|
|
47
52
|
},
|
|
48
53
|
"dependencies": {
|
|
49
|
-
"@awesome.me/kit-394c25e5aa": "^1.0.61",
|
|
50
|
-
"@awesome.me/kit-a9f9eb613f": "^1.0.278",
|
|
51
54
|
"@base-ui/react": "^1.2.0",
|
|
52
|
-
"@
|
|
53
|
-
"@fortawesome/pro-light-svg-icons": "^6.7.2",
|
|
54
|
-
"@fortawesome/pro-regular-svg-icons": "^6.7.2",
|
|
55
|
-
"@fortawesome/pro-solid-svg-icons": "^6.7.2",
|
|
56
|
-
"@fortawesome/react-fontawesome": "^3.3.1",
|
|
55
|
+
"@deriv/quill-icons": "^2.8.2",
|
|
57
56
|
"@hookform/resolvers": "^5.2.2",
|
|
58
57
|
"class-variance-authority": "^0.7.1",
|
|
59
58
|
"clsx": "^2.1.1",
|
|
@@ -93,7 +92,9 @@
|
|
|
93
92
|
"lodash": "^4.18.0",
|
|
94
93
|
"postcss": "^8.5.10",
|
|
95
94
|
"qs": "^6.15.2",
|
|
96
|
-
"hono": "^4.12.
|
|
97
|
-
"esbuild": "^0.28.1"
|
|
95
|
+
"hono": "^4.12.25",
|
|
96
|
+
"esbuild": "^0.28.1",
|
|
97
|
+
"js-yaml": "^4.2.0",
|
|
98
|
+
"@babel/core": "^7.29.6"
|
|
98
99
|
}
|
|
99
100
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/styles.css
CHANGED
|
@@ -1313,6 +1313,12 @@
|
|
|
1313
1313
|
background-color: var(--button-ghost-static-dark-bg-pressed) !important;
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
|
+
/* Banner pagination fill — animates the selected pill from 0% to 100% width */
|
|
1317
|
+
@keyframes banner-fill {
|
|
1318
|
+
from { width: 0% }
|
|
1319
|
+
to { width: 100% }
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1316
1322
|
/* Spinner — pill-style activity indicator */
|
|
1317
1323
|
@keyframes spinner-fade {
|
|
1318
1324
|
0% {
|
|
@@ -1798,6 +1804,19 @@
|
|
|
1798
1804
|
--pagination-text-default: var(--primitive-slate-1200);
|
|
1799
1805
|
--pagination-text-disabled: var(--primitive-slate-alpha-200);
|
|
1800
1806
|
|
|
1807
|
+
/* Banner block */
|
|
1808
|
+
--banner-bg-surface-blue: var(--primitive-blue-alpha-100);
|
|
1809
|
+
--banner-bg-surface-dark: var(--background-default-solid-static-dark);
|
|
1810
|
+
--banner-tag-bg-sapphire: oklch(0.393 0.254 264.1);
|
|
1811
|
+
--banner-close-bg-light: var(--primitive-slate-alpha-100);
|
|
1812
|
+
--banner-close-bg-light-hover: var(--primitive-slate-alpha-200);
|
|
1813
|
+
--banner-close-bg-dark: var(--primitive-white-alpha-100);
|
|
1814
|
+
--banner-close-bg-dark-hover: var(--primitive-white-alpha-200);
|
|
1815
|
+
|
|
1816
|
+
/* Feedback success card (always dark bg) */
|
|
1817
|
+
--feedback-success-bg: var(--primitive-slate-1200);
|
|
1818
|
+
--feedback-success-tag-border: var(--primitive-slate-200);
|
|
1819
|
+
|
|
1801
1820
|
/* Notification */
|
|
1802
1821
|
--notification-title-banner: var(--primitive-slate-50);
|
|
1803
1822
|
--notification-title-item: var(--primitive-slate-1200);
|
|
@@ -2130,6 +2149,15 @@
|
|
|
2130
2149
|
--chip-lg-border-width-selected: var(--semantic-size-border-1-5);
|
|
2131
2150
|
|
|
2132
2151
|
/* ── Tag ── */
|
|
2152
|
+
--tag-2xs-height: var(--semantic-size-width-height-16);
|
|
2153
|
+
--tag-2xs-padding-horizontal: var(--semantic-size-spacing-4);
|
|
2154
|
+
--tag-2xs-gap: var(--semantic-size-spacing-4);
|
|
2155
|
+
--tag-2xs-font-size: var(--semantic-size-width-height-8);
|
|
2156
|
+
--tag-2xs-font-weight: 600;
|
|
2157
|
+
--tag-2xs-radius: var(--semantic-size-radius-4);
|
|
2158
|
+
--tag-2xs-min-width: var(--semantic-size-width-height-16);
|
|
2159
|
+
--tag-2xs-icon-size: 10px;
|
|
2160
|
+
|
|
2133
2161
|
--tag-sm-height: var(--semantic-size-width-height-24);
|
|
2134
2162
|
--tag-sm-padding-horizontal: var(--semantic-size-spacing-8);
|
|
2135
2163
|
--tag-sm-gap: var(--semantic-size-spacing-4);
|
|
@@ -2554,6 +2582,13 @@
|
|
|
2554
2582
|
--tag-fill-bg-green: var(--primitive-green-alpha-200);
|
|
2555
2583
|
--tag-fill-bg-blue: var(--primitive-blue-alpha-200);
|
|
2556
2584
|
|
|
2585
|
+
/* Banner block — dark */
|
|
2586
|
+
--banner-bg-surface-blue: var(--primitive-blue-alpha-300);
|
|
2587
|
+
|
|
2588
|
+
/* Feedback success card — dark (same as :root; block is always dark bg) */
|
|
2589
|
+
--feedback-success-bg: var(--primitive-slate-1200);
|
|
2590
|
+
--feedback-success-tag-border: var(--primitive-slate-200);
|
|
2591
|
+
|
|
2557
2592
|
/* Chip */
|
|
2558
2593
|
--chip-text-prominent: var(--primitive-slate-50);
|
|
2559
2594
|
--chip-text-disabled: var(--primitive-white-alpha-200);
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
# trading.game — Design Principles
|
|
2
|
-
|
|
3
|
-
*High-level product design guidance for designers and AI agents*
|
|
4
|
-
|
|
5
|
-
Version 1.1 · April 2026 · *Updated to align with Product Vision & Strategy*
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
trading.game makes trading feel intuitive, fun, and exciting — without losing the confidence and seriousness that financial products require. These principles define the design personality of the product and guide how AI agents apply components, layouts, motion, copy, and brand assets. These principles are rooted in the [trading.game Product Vision & Strategy](trading-game-product-vision.md) and should be read alongside it. This is not a style guide. It is a decision framework — giving AI enough direction to design with the right taste, energy, and priorities without over-constraining creativity.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## How AI agents should use this
|
|
14
|
-
|
|
15
|
-
- Treat these principles as a decision framework, not a checklist
|
|
16
|
-
- Adapt emphasis, hierarchy, density, and motion before inventing new patterns
|
|
17
|
-
- When unsure, reduce friction before adding flair
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Core principles
|
|
22
|
-
|
|
23
|
-
### 1. Trading first
|
|
24
|
-
|
|
25
|
-
Every screen should make trading feel central. Game mechanics, rewards, and visual excitement should support the trading journey, not compete with it.
|
|
26
|
-
|
|
27
|
-
*Agent guidance:* Prioritise price, action, progress, outcome, and decision-making signals. Entertainment should sharpen focus, not pull attention away from the core task.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
### 2. Intuitive by default
|
|
32
|
-
|
|
33
|
-
Complexity must be absorbed by the interface, not pushed onto the user. The product should feel natural to navigate, quick to scan, and obvious to act on. Trading is never simple when real money is at stake — but the experience of trading can be intuitive.
|
|
34
|
-
|
|
35
|
-
*Agent guidance:* Reduce visible choices, sequence decisions clearly, and reveal more only when needed. Make the next step obvious. Never hide complexity — make it make sense.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
### 3. Clean and focused
|
|
40
|
-
|
|
41
|
-
The UI should feel lightweight, modern, and intentional. Nothing should look cluttered, accidental, or overworked.
|
|
42
|
-
|
|
43
|
-
*Agent guidance:* Give content room, keep hierarchy obvious, and let one key action or message lead each view.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
### 4. Excitement with control
|
|
48
|
-
|
|
49
|
-
The experience should have energy, pace, and momentum — but never feel noisy or chaotic. Excitement should come from progress, timing, and feedback.
|
|
50
|
-
|
|
51
|
-
*Agent guidance:* The product should feel alive and responsive — every action produces a reaction. Use motion, contrast, and celebration selectively. Keep the core experience calm enough for confident decisions.
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
### 5. Fun, not childish
|
|
56
|
-
|
|
57
|
-
trading.game should feel playful, rewarding, and fresh — but never gimmicky. It should win through confidence and smart interaction design, not novelty for novelty's sake.
|
|
58
|
-
|
|
59
|
-
*Agent guidance:* Favour sophistication over cartoon behaviour. Keep the tone upbeat but grounded.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
### 6. Reward progress
|
|
64
|
-
|
|
65
|
-
The experience should make users feel movement, mastery, and achievement. Good design creates momentum and helps users feel better the more they use it.
|
|
66
|
-
|
|
67
|
-
*Agent guidance:* Surface progress, completion, milestones, and positive feedback in a clear, motivating way.
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
### 7. Trust in every detail
|
|
72
|
-
|
|
73
|
-
Because this is trading, the product must feel dependable at all times. Accuracy, transparency, and professionalism are non-negotiable.
|
|
74
|
-
|
|
75
|
-
*Agent guidance:* Make balances, status, outcomes, pricing, timing, and risk cues clear. Avoid visual tricks or playful treatment of serious information.
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
### 8. Consistency creates fluency
|
|
80
|
-
|
|
81
|
-
Users should quickly learn how the product behaves and feel faster with every interaction. Familiar patterns build confidence.
|
|
82
|
-
|
|
83
|
-
*Agent guidance:* When a pattern already exists in the product, use it. Consistency is not a constraint — it is how the product earns trust over time. Novelty should only enter when it genuinely improves the experience, not for variety's sake.
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Checklist
|
|
88
|
-
|
|
89
|
-
Run this before completing any screen or feature.
|
|
90
|
-
|
|
91
|
-
- [ ] This screen feels like trading.game — not generic
|
|
92
|
-
- [ ] Trading is still the hero — game elements support, not distract
|
|
93
|
-
- [ ] The next action is obvious without explanation
|
|
94
|
-
- [ ] Energy comes from the experience, not decoration
|
|
95
|
-
- [ ] Serious information is treated seriously
|
|
96
|
-
- [ ] A first-time user would understand this without instructions
|
|
97
|
-
- [ ] The platform layer feels trustworthy enough to deposit real money
|
|
98
|
-
- [ ] One pattern was reused before a new one was invented
|