HAi1Y Design System

com.moba11y:hai1y-design · version 1.7.2

HAi1Y Design SystemAccessible Compose components in HAi1Y's palette, shared by every MobA11y app.

54components, live on the web
17files
4.5:1contrast or better
5 sbefore a progress bar

Chapter 1

Two products, one library

The whole palette and every component are HAi1Y. Each app adds one brand color of its own: Gringotts adds gold and vault navy, kept in its own app and marked in gold on this page.

HAi1Y owns

  • The persona: voice, tone and habits
  • The chat in every app (in Gringotts, only the chat)
  • This design system: its components and rules
  • The whole palette: purple, blue, teal, neutrals, status

Gringotts owns

  • The investment app: accounts, trading, ledger, buy plans
  • Strategies, models and research
  • Its brand: gold, vault navy, the coin, the banners
  • The server, the API and the screens around the chat

Chapter 2

Palette

Every color the library defines, from Palette.kt, the one place colors live. Screens never use a hex value, only roles.

VioletHAi1Y
100E2D9F8
300AB96EE
6006528CC
7004E1DA2
9003A1672
Blueaction
100DCE7FE
4006CB0FF
7001D4ED8
9001E3A8A
Tealcalm information
100CCFBF1
3005EEAD4
4002DD4BF
7000F766E
900134E4A
Rederrors, losses
100FEE2E2
300FF8A8A
600DC2626
700B4232C
800991B1B
9005F1414
Green, Amber, Pink, Slategains, chart lines, cash
G3005BE38A
G80015692D
A400FBBF24
A700B45309
P400F472B6
P700BE185D
S40094A3B8
S50064748B
Lavenderlight surfaces
PaperFBFAFF
50F7F4FE
100F2EEFC
200EDE8FA
300E8E2F8
OutlineCFC7E0
Gray6006E6680
Ink1C1726
Nightdark surfaces
00C0715
Night120B1F
11A1129
21F1530
3261A3A
42E2145
Outline44395A
MistEAE4F5
Gold Gringottsits coin, its brand
200F8DE95
500E0A526
700A86F06
Ink3A2600
Vault Gringottsits navy surfaces
200B9C0DA
70026355E
900141C36

Chapter 3

Color carries meaning

A color is never decoration. Each one tells you something, and status always comes with words or a sign too.

Blue: you can act

Buttons, links, toggles, ⓘ and ⚙, reply buttons, the chosen tab. Nothing else.

Values: bold text

Amounts, prices, percentages, a setting's value, semi-bold with fixed-width digits, never a color: $1,284.50

Teal: calm information

Notices that inform and ask nothing of you.

Purple: HAi1Y

Section tints and headings, HAi1Y's badges, your chat bubbles. Never an action, whatever the active color.

Gain and loss

Always signed: +$42.10 and −$8.75

Everything else: text

Headings included. Weight and size make the hierarchy.

Chapter 4

Every component, live

Each one below is the real web version from hai1y-design-web, working: tap, drag, use the keyboard. Grouped as they are in the Android library. Every component also works with a screen reader.

Waiting and progress Progress.kt · Components.kt

h-progressProgressBar · steps and time left
h-waitingWaiting · a spinner, a bar after 5 seconds
h-loading · h-spinnerLoading · Spinner
The plain spinner, for the first seconds.
h-problem · h-headingProblem · Heading

Tables and settings Settings.kt

h-settings-tableSettingsTable · ⓘ on every row
h-name-value-tableNameValueTable · icons HAi1Y chooses
h-staged-settingsStagedSettings · change, then send all
h-basics-expertBasicsAndExpert · Basics save at once
h-setting-info · h-setting-editorSettingInfo · SettingEditor panels

Use This hands the new value back; nothing changes until then.

h-spoken-noteSpokenNote · heard, not seen

A screen reader hears "Added IPO Bounce." Nothing appears on screen: feedback lives in HAi1Y's chat.

Lists and rows Lists.kt · Rows.kt · Sections.kt

h-collapsible-group · h-info-rowCollapsibleGroup · InfoRow
h-collapsible-cardCollapsibleCard · a main item
h-choice-rowChoiceRow · acts at once
h-switch-row · h-detail-row · h-soon-rowSwitchRow · DetailRow · SoonRow
h-stat · h-pill · h-initialsStat · Pill · Initials
h-sectionSection · an information group

Notices, text and choices Notice.kt · RichText.kt · Truncated.kt · Controls.kt · PromptField.kt

h-noticeNotice · information only, four tones
h-rich-textRichText · lists the way the style guide asks
h-truncated · h-full-text-overlayTruncatedText · FullTextOverlay
h-period-picker · h-segmentedPeriodPicker · SegmentedSetting
h-prompt-fieldHai1yPromptField · asking is searching
h-slide-switch · h-slide-to-confirmSlideSwitch · SlideToConfirm · a full slide to act

Drag all the way across, or press Enter on it.

Conversation Chat.kt

h-bubble · h-repliesChatBubble · ReplyButtons
Energy's backtest is ready. Shall I compare it with SPY? How did it do last year?
h-hai1y-button · h-sphereHai1yButton · Hai1ySphere

Charts Charts.kt · Compare.kt · Brand.kt · Theme.kt

h-value-chartValueChart · arrow keys or pointer
h-gain-barsGainBars · signed, read as text
h-donut · h-allocation-donutDonut · AllocationDonut
h-compare-plot · h-chart-steps · h-readout · h-line-sample · h-compare-table · h-on-blackMarkets' chart, on black · tap it, then ‹ › or arrow keys
XLE TGT CCJ line 4 line 5

Also in the library: .h-sheet-scroll (SheetScroll: a scroll area inside a sheet that never drags the sheet) and .h-theme, HAi1Y's own theme on any container.

Chapter 5

Gringotts' brand, kept apart

On the web, Gringotts' pieces already live in their own files, web/brand/gringotts.css and .js: gold and vault navy belong to Gringotts alone. Android still keeps them inside HAi1Y's library.

g-coinGringottsCoin · the middle tab's coin
g-market-statusMarketStatusBadge · a dot or a ring, always words
g-vault-buttonVaultButton · light violet on navy

One component, two brands data-brand="gringotts" is GringottsTheme

HAi1Y's own colorsthe library's default
Gringotts' gold and navyinside Gringotts' app

Chapter 6

In the terminal

The components that make sense as text, from design/terminal/hai1y_term.py, in HAi1Y's colors (no gold). Run it to see them in color: python3 design/terminal/hai1y_term.py

── ProgressBar ─────────────────────────────────────────────────
Backtesting Energy  ████████████████████████  13 of 26 (50%) about 8 min left
HAi1Y is writing  ████████████████████████  running 0:12
Publishing the library  ████████████████████████  done ✓
Replaying your strategies  ████████████████████████  stopped early ✗

── SettingsTable ───────────────────────────────────────────────
┌──────────────────────────┐
│ Stop Loss          8%  ⓘ │
│ Largest Position  20%  ⓘ │
│ Take Profit       Off  ⓘ │
└──────────────────────────┘

── NameValueTable ──────────────────────────────────────────────
┌──────────────────────────────────┐
│ Return                 +12.1%  ⓘ │
│ Worst Drop             −24.8%  ⚠ │
│ Period           2000 to 2025  ◷ │
│ Liquidity Floor    $2,000,000  ⊠ │
│ Trades a Year             298    │
└──────────────────────────────────┘

── DetailRow · SwitchRow ───────────────────────────────────────
Account       •••• 4821
Buy Plans                                         [  ●] On 
When one is ready to approve or decline.
Sales                                             [●  ] Off
When a stock sells, with its gain or loss.

── SegmentedSetting · PeriodPicker ─────────────────────────────
Trading  [ Active ]  Inactive    Sell Now  
Period   [ Week ]  Month    3 Months    Year  

── Pill · Stat ─────────────────────────────────────────────────
(Chosen) (SPY) (Paper) (Failed) 
+12.1%         17 of 26       t 1.40         
Return         Years Ahead    Reliability    

── Notice ──────────────────────────────────────────────────────
 ✦ New from HAi1Y
   Ask me to compare any two strategies.
 ⓘ Rebalance Pending
   Shares even out after tonight's settlement.
 ⚠ Trading Inactive
   No new buys; positions still sell at the right time.

── CollapsibleGroup · ChoiceRow ────────────────────────────────
▾ Data-Driven Strategies (3)
  ├ Seasonal Retail         +2.4%
  ├ Energy                  −1.1%
  └ Yearly Bounce Back      No Stocks
  ✓ Seasonal Retail  Chosen
  → Energy
  → Yearly Bounce Back

── RichText ────────────────────────────────────────────────────
Two ways to step back:
  • Trading Inactive: no new buys; positions sell at the right time.
  • Sell Now: sells everything, then holds cash.

── ChatBubble · ReplyButtons ───────────────────────────────────
HAi1Y
│ Energy's backtest is ready. Shall I compare it with SPY?
                                        You
                                      How did it do last year? │
[ Yes, Compare It ]  [ No, That's All ]  

── ValueChart ──────────────────────────────────────────────────
Account value this week, up 4.2%
  ▁▁▁▂▂▂▁▁▁▄▄▄▄▄▄▆▆▆███
  Mon $1,000.00  →  Tue $1,042.00  +$42.00

── GainBars ────────────────────────────────────────────────────
XLE                   │████████████████  +6.2%
CCJ                   │████████          +3.1%
TGT             ██████│                  −2.4%
M         ████████████│                  −4.8%

── AllocationDonut, as shares ──────────────────────────────────
Seasonal Retail   ██████████████                 $469.00  45%
Energy            ███████████                    $365.00  35%
Cash              ██████                         $208.00  20%
Total                                            $1,042.00

── ActiveReadout ───────────────────────────────────────────────
Oct 22 · changes from Oct 12
  XLE     $92.40  +$4.30   ▲ 4.88%
  TGT    $146.90  −$4.30   ▼ 2.84%
  CCJ     $56.30  +$4.30   ▲ 8.27%

── Problem ─────────────────────────────────────────────────────
 ✗ The ledger didn't load. Check the connection and try again.
   [ Try Again ]

Chapter 7

All 54 components

By file, as they sit in hai1y-design-android. Gold outlines mark Gringotts' pieces.

Brand.kt
  • Hai1ySphere
  • GringottsCoin
  • AnnouncementBanner
  • GringottsBanner
  • AllocationDonut
  • Donut
  • AccountBanner
  • VaultButton
Charts.kt · Compare.kt
  • ValueChart
  • GainBars
  • MarketStatusBadge
  • ComparePlot
  • ActiveReadout
  • LineSample
  • CompareTableView
  • ChartStepsOverlay
Chat.kt · PromptField.kt
  • ChatBubble
  • ReplyButtons
  • Hai1yButton
  • Hai1yPromptField
Components.kt · Progress.kt
  • Heading
  • Loading
  • Spinner
  • Problem
  • ProgressBar
  • Waiting
Lists.kt · Rows.kt
  • CollapsibleCard
  • CollapsibleGroup
  • InfoRow
  • ChoiceRow
  • SwitchRow
  • DetailRow
  • SoonRow
  • Initials
  • Pill
  • Stat
Settings.kt
  • SettingsTable
  • NameValueTable
  • SettingInfo
  • SettingEditor
  • StagedSettings
  • BasicsAndExpert
  • SpokenNote
Notice.kt · Sections.kt · RichText.kt · Truncated.kt
  • Notice
  • Section
  • RichText
  • TruncatedText
  • FullTextOverlay
Controls.kt · Toggles.kt · Theme.kt · SheetScroll.kt
  • PeriodPicker
  • SegmentedSetting
  • SlideSwitch
  • SlideToConfirm
  • GringottsTheme
  • OnBlack

Tested by :design:testDebugUnitTest, published by each design repository's ./publish.sh. The guide for builders is hai1y-design-android's README.md; HAi1Y's own guide is in its chat instructions.