Theming

tradecn reads shadcn's palette and adds the tokens a trading screen needs on top of it.

Tokens

Components, hooks and utilities add the tokens their files use to your stylesheet in :root and .dark. They preserve existing values, so you can set --up and --down before installing another item. Themes have different overwrite behavior, described below. See rule 7 of the item contract.

The default light marks come from tradecn-slate; dark marks are tuned for shadcn's near-black surfaces. Tests check contrast for specified text and mark pairs on the supplied surfaces. If you change a surface or token, check the resulting contrast in your application.

TokenLight, then darkAdded by
--tradecn-font-accessible'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', ui-sans-serif, system-ui, sans-serifformat, data-grid, panel, watchlist, blotter, workspace, ticket, quote-field, rfq-ticket, rfq-stack, perf-monitor, hotkey-editor, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, layout-manager, instrument-search, depth-ladder, spread-matrix, quote-panel, session-guard, price-chart, grid-rules, limits
--tradecn-font-accessible-mono'Atkinson Hyperlegible Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospaceformat, data-grid, panel, watchlist, blotter, workspace, ticket, quote-field, rfq-ticket, rfq-stack, perf-monitor, hotkey-editor, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, layout-manager, instrument-search, depth-ladder, spread-matrix, quote-panel, session-guard, price-chart, grid-rules, limits
--tradecn-font-mono'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospaceformat, data-grid, panel, watchlist, blotter, workspace, ticket, quote-field, rfq-ticket, rfq-stack, perf-monitor, hotkey-editor, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, layout-manager, instrument-search, depth-ladder, spread-matrix, quote-panel, session-guard, price-chart, grid-rules, limits
--tradecn-font-numericvar(--tradecn-font-sans)format, data-grid, watchlist, blotter, ticket, quote-field, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, session-guard, price-chart, grid-rules, limits
--tradecn-font-sans'Inter', ui-sans-serif, system-ui, sans-serifformat, data-grid, watchlist, blotter, ticket, quote-field, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, session-guard, price-chart, grid-rules, limits
--downoklch(0.46 0.19 40)
oklch(0.66 0.19 40)
flash-cell, data-grid, sparkline, watchlist, blotter, ticket, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, price-chart
--down-softoklch(0.46 0.19 40 / 18%)
oklch(0.66 0.19 40 / 18%)
flash-cell, data-grid, sparkline, watchlist, blotter, ticket, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, price-chart, grid-rules
--flatvar(--color-muted-foreground)flash-cell, data-grid, sparkline, watchlist, blotter, ticket, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, price-chart
--flat-softoklch(0.55 0 0 / 14%)
oklch(0.7 0 0 / 14%)
flash-cell, data-grid, sparkline, watchlist, blotter, ticket, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, price-chart, grid-rules
--upoklch(0.52 0.13 165)
oklch(0.74 0.15 165)
flash-cell, data-grid, feed-health, sparkline, watchlist, blotter, ticket, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, price-chart
--up-softoklch(0.52 0.13 165 / 18%)
oklch(0.74 0.15 165 / 18%)
flash-cell, data-grid, sparkline, watchlist, blotter, ticket, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, depth-ladder, spread-matrix, quote-panel, price-chart, grid-rules
--expiring-softoklch(0.53 0.2 350 / 18%)
oklch(0.74 0.17 350 / 18%)
data-grid, watchlist, blotter, countdown, rfq-ticket, rfq-stack, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, quote-panel, session-guard, grid-rules
--stale-softoklch(0.52 0.13 75 / 16%)
oklch(0.8 0.15 80 / 16%)
data-grid, feed-health, watchlist, blotter, rfq-stack, column-chooser, rules-editor, alerts, status-bar, parameter-grid, positions, audit-trail, quote-panel, grid-rules
--staleoklch(0.52 0.13 75)
oklch(0.8 0.15 80)
feed-health, ticket, rfq-ticket, perf-monitor, hotkey-editor, alerts, layout-manager
--link-1oklch(0.53 0.2 25)
oklch(0.7 0.19 25)
panel, workspace
--link-2oklch(0.5 0.15 250)
oklch(0.7 0.14 250)
panel, workspace
--link-3oklch(0.5 0.13 150)
oklch(0.74 0.14 150)
panel, workspace
--link-4oklch(0.52 0.12 85)
oklch(0.85 0.15 90)
panel, workspace
--panel-activevar(--color-primary)panel, workspace
--panel-drag-targetvar(--color-ring)panel, workspace
--panel-errorvar(--color-destructive)panel, workspace
--panel-syncoklch(0.5 0.12 220)
oklch(0.78 0.12 220)
panel, workspace
--expiringoklch(0.53 0.2 350)
oklch(0.74 0.17 350)
countdown, rfq-ticket, rfq-stack, alerts, session-guard
--chart-1oklch(0.56 0.15 65)
oklch(0.8 0.15 70)
price-chart
--chart-2oklch(0.52 0.12 230)
oklch(0.78 0.11 230)
price-chart
--chart-3oklch(0.52 0.13 165)
oklch(0.74 0.15 165)
price-chart
--chart-4oklch(0.55 0.13 95)
oklch(0.88 0.15 100)
price-chart
--chart-5oklch(0.5 0.14 250)
oklch(0.72 0.12 250)
price-chart
--chart-6oklch(0.5 0.18 40)
oklch(0.7 0.18 40)
price-chart
--chart-7oklch(0.52 0.15 345)
oklch(0.76 0.13 345)
price-chart
--chart-8var(--color-foreground)price-chart
--tradecn-text-size-grid-min12pxagent-kit

Themes

Themes replace the shadcn palette, radius and every tradecn token, including the font stacks. They add CSS variables and typography rules without component or font files.

Review the variables and rules in a theme's Manual installation tab before installing it. To compare them with your stylesheet, pass its path to --diff, such as --diff src/index.css. Use the tailwind.css path from your components.json. A bare --diff does not show theme CSS changes.

For older theme recipes that show a bare --diff, add your stylesheet path.

Each theme provides light and dark values, switched by your dark class. This site defaults to tradecn-amber, with blue for up and vermilion for down. Items installed without a theme use green for up. Choose the direction convention your application needs; color alone must not carry meaning.

Color explains the contrast checks, non-color cues and limitations of the simulated color-vision previews. Those previews are not a guarantee that every user can distinguish a pair.

Typography

Set --tradecn-font-sans, --tradecn-font-mono and --tradecn-font-numeric to choose font stacks for tradecn components. The table above lists the tokens installed by individual items. Typography includes the full token reference, font loading, sizes, weights and setup for data-accessibility="hyperlegible".

Load the fonts yourself; setting a token doesn't download a font. Numeric nodes must request font-variant-numeric: lining-nums tabular-nums, which the installed-style browser checks verify. When replacing a font, check that it supplies those features.

Light and dark

The button at the end of the header switches this site between light and dark, and every preview with it; until you press it, the site follows your system. Both sides are tradecn-amber, warm paper by day and near-black by night, set in Inter with JetBrains Mono for code, the two faces the typography tokens name. The menu beside the button tries another theme on the site and every preview, both sides, until you pick amber again. A theme's own preview wears that theme in both modes whatever the menu says.