OptionsPlay
Design system v2.0.0172 tokensWCAG 2.1 AA

One system behind every OptionsPlay surface

Twelve years of UI fragmentation, replaced by a single token source that compiles to CSS variables, Tailwind theme values and TypeScript types — with a build step that fails on any hardcoded color.

Token source
tokens/tokens.json
One file feeds design, code and the MCP server.
Guardrail
npm run lint:tokens
Blocks raw hex, rgb() and off-system Tailwind colors.
Handoff
POST /api/mcp
Agents read tokens and validate components.

Color

Six scales, each generated from tokens.json. Every swatch shows its contrast against white — the pairs used for text all clear WCAG 2.1 AA (4.5:1).

Brand / Blue

Primary interactive color. 600 is the CTA default.

  • 501.07
  • 1001.15
  • 2001.56
  • 3002.23
  • 4003.38
  • 5005.22
  • 6007.67
  • 7009.59
  • 80011.81
  • 90014.89

Brand / Green

OptionsPlay lime. Pair 500 with Neutral/900 text, or use 700 under white text.

  • 501.06
  • 1001.15
  • 2001.32
  • 3001.56
  • 4001.84
  • 5002.22
  • 6003.12
  • 7004.69
  • 8007.25
  • 90011.22

Semantic / Success

Bullish signals, win rates, positive P&L.

  • 501.05
  • 1001.08
  • 2001.26
  • 3001.37
  • 4001.77
  • 5002.66
  • 6004.55
  • 7005.9
  • 8007.04
  • 9009.95

Semantic / Red

Bearish signals, risk and destructive actions.

  • 501.07
  • 1001.15
  • 2001.6
  • 3002.23
  • 4002.67
  • 5003.17
  • 6004.55
  • 7005.17
  • 8006.01
  • 9009.24

Semantic / Amber

Warnings, open positions, “hot” tags.

  • 501.04
  • 1001.14
  • 2001.27
  • 3001.44
  • 4001.6
  • 5001.9
  • 6002.14
  • 7004.83
  • 8006.11
  • 9009.4

Semantic / Neutral

Surfaces, borders and text.

  • 501
  • 1001.09
  • 2001.18
  • 3001.31
  • 4001.95
  • 5003.68
  • 6005.31
  • 7007.88
  • 80011.76
  • 90014.1

Semantic aliases

Components never reference a raw scale. They use function-named aliases, so a palette change flows through the whole product.

fg

  • semantic.neutral.900
  • semantic.neutral.700
  • semantic.neutral.600
  • semantic.neutral.500
  • semantic.neutral.50
  • brand.blue.600
  • semantic.success.700
  • semantic.red.700
  • semantic.amber.700

surface

  • semantic.neutral.100
  • semantic.neutral.50
  • semantic.neutral.100
  • semantic.neutral.200
  • brand.blue.50
  • semantic.neutral.900
  • brand.blue.600

line

  • semantic.neutral.200
  • semantic.neutral.300
  • semantic.neutral.400
  • brand.blue.600

action

  • brand.blue.600
  • brand.blue.800
  • brand.blue.900
  • semantic.neutral.200

Typography

Inter, nine steps, each carrying its own size, line height, weight and tracking as a single Tailwind class.

Type scale

Class names map 1:1 to the Figma text styles.

  • Display48px / 56px · 600
  • Heading 132px / 40px · 600
  • Heading 224px / 32px · 600
  • Heading 320px / 28px · 500
  • Heading 416px / 24px · 500
  • Body / Large14px / 20px · 400
  • Body / Medium13px / 20px · 400
  • Caption12px / 16px · 400
  • Overline11px / 16px · 600

Dynamic type sizing

Body text scales with the reader’s preference, from XSmall to XXXLarge, without breaking the 8pt rhythm.

AAPL is in a bearish trend with support at $246.48. Implied volatility rank sits at 24%, so debit strategies screen better than credit spreads today.

  • xsmall 13px/20px
  • small 14px/20px
  • medium 15px/24px
  • default 16px/24px
  • xlarge 18px/24px
  • xxlarge 20px/24px
  • xxxlarge 22px/24px

Space, radius & elevation

An 8pt base grid with a 4px half-step. Cards are flat by default; elevation only signals layering.

Spacing

8pt grid

  • 4px
  • 8px
  • 12px
  • 16px
  • 20px
  • 24px
  • 32px
  • 40px
  • 48px
  • 64px
  • 80px
  • 96px

Radius

Md (8px) is the product default

Elevation

Level 0 is flat — the default for cards

  • Flat, no shadow (default for cards and buttons)
  • Raised: selected cards, sticky headers
  • Overlay: dropdowns, popovers
  • Modal: dialogs, drawers

Motion

Two durations and one easing curve cover almost every transition.

  • 120ms
  • 200ms
  • 320ms

Buttons

Body/Lg medium · 8px radius · 16/8 padding · flat by default. Hover and pressed states are shown forced, so every state is reviewable at a glance.

Variants × states

Primary, Secondary and Tertiary cover 95% of the product. Danger is reserved for destructive actions.

VariantDefaultHoverPressedDisabledLoading
Primary
Secondary
Tertiary
Danger
Brand

Sizes

sm 32px · md 36px · lg 44px (the minimum touch target)

Icon buttons

Icon-only controls always carry an accessible name and a tooltip.

Form controls

Structured inputs first: autocomplete for symbols, dropdowns for enumerated values, free text only when nothing else fits.

Input states

Default · Hover · Focused · Disabled · Error

Enter a strike price above 0

Select & autocomplete

Symbol search is an ARIA combobox with keyboard navigation.

Strategy
Symbol

Toggle

Default and Small, with loading and disabled states.

Updates every 1.5s

Badges

Status is never carried by color alone — the label states it.

SuccessBullishWarningBearishNeutralInfoNewHotTable size

Data display

Financial data uses tabular numerals so digits stay aligned as prices tick.

Data table

Sortable headers, selectable rows, pagination footer

Example option data
TypeExp.ChangeIV
AAPLBearish$251.0826506/18/26$6.41+9.7062%83
AAPLBearish$251.0826506/18/26$3.37+0.708%74
AAPLBearish$251.0825505/01/26$7.47+16.8064%64
MSFTBullish$428.1540505/15/26$2.97−13.2010%65
MSFTBullish$428.1541005/01/26$2.27−10.3071%54

Calendar

Trade journal statuses

September 2026
Mo
Tu
We
Th
Fr
Sa
Su

Scores & change

Score circles and signed values

82684530
+$2.41(+1.12%)−$1.83(−0.74%)

Loading & empty

Every widget ships all four states

No results

Try another filter.

Anatomy

Every component references tokens rather than values — that is what makes a palette or spacing change a one-line edit.

Primary button, decomposed

  • Color token

    Brand/Blue/600 · #00539F · AA on white

  • Elevation token

    Level 0 — flat, 8px radius, no stroke

  • Spacing token

    16px horizontal · 8px vertical · 36px height

  • Typography token

    Body/Lg · 14/20 · weight 500

01 — Organisms

Every new feature inherits the same spatial logic without anyone enforcing it by hand.

02 — Semantic names

Tokens are named by function (surface, line, action), not by appearance.

03 — JSON export

Design and code share one token source; tokens.json compiles to CSS, Tailwind and types.

04 — Token first

Components reference tokens for handoff and future re-theming.

05 — Additive variants

New variants extend the system instead of replacing existing ones.

06 — Usage docs

Each component ships do’s and don’ts alongside the code.

Usage guidelines

The interaction rules the trading UI is held to.

Do

  • Use autocomplete for symbol entry.
  • Use structured inputs (dropdowns) whenever values are enumerable.
  • Place inputs next to the data they control.
  • Give feedback immediately — validate on blur, not on submit.

Don’t

  • Rely on free text for structured data.
  • Scatter filters across a layout or overload a toolbar.
  • Delay feedback until after a form is submitted.
  • Signal bullish/bearish with color alone.

Placement — do

Filters sit directly above the table they filter.

Placement — don’t

Free text for structured data, far from the results it affects.

Accessibility

WCAG 2.1 AA is a build-time constraint here, not a review step.

Contrast verification

Ratios are computed in the browser from the live token values.

PairSampleRatioAAAAA
Primary text on canvas$251.0812.93PassPass
Secondary text on surface$251.087.88PassPass
Tertiary text on surface$251.085.31Pass—
Inverse text on Blue/600$251.087.67PassPass
Bullish badge$251.086.51Pass—
Bearish badge$251.085.23Pass—
Warning badge$251.085.34Pass—
Info badge$251.088.37PassPass
Primary text on brand lime$251.086.34Pass—
Inverse text on lime/700$251.084.69Pass—

Success criteria

How each one is met in this build.

  • 1.4.3 Contrast (minimum)Every text token pair is verified below; the build fails on hardcoded colors.
  • 1.4.1 Use of colorBullish/bearish values carry a +/− sign and an arrow, not just color.
  • 1.4.11 Non-text contrastBorders, focus rings and chart strokes use Neutral/400 or darker.
  • 2.1.1 KeyboardTabs, menus, dropdowns, the calendar and widget resizing all work from the keyboard.
  • 2.4.7 Focus visibleA single 2px Blue/600 ring token is applied to every interactive element.
  • 2.5.5 Target sizeTouch targets are at least 44×44px; the bottom nav enforces it.
  • 4.1.2 Name, role, valueIcon-only buttons require a label prop; tables expose aria-sort.
  • 2.3.3 Animation from interactionsprefers-reduced-motion collapses all transitions to 1ms.

MCP handoff

The design system is queryable over Model Context Protocol, so an AI agent can read tokens and validate generated UI instead of guessing.

Try a tool call

POST /api/mcp · JSON-RPC 2.0

Tool

Connect an agent

Stdio server for CLI agents, HTTP for web agents

4 tools
npm run mcp:server        # stdio transport
curl -s localhost:3000/api/mcp \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
  • get_tokensReturn every design token as JSON
  • get_component_specProps, states and tokens for one component
  • check_wcag_contrastContrast ratio + AA/AAA verdict for two colors
  • validate_component_syntaxFlag hardcoded colors and raw HTML controls