Design tokens
The SalesOS palette, accessible text colours, typography, radii and shadows for light and dark mode — as TypeScript constants, CSS custom properties and a Tailwind preset.
@salesos/design-tokens is the SalesOS design system as data. Use it so an
app extension looks like the rest of SalesOS and
keeps to the same WCAG 2.1 AA contrast.
Inside an extension you don't need the stylesheet to follow the user's theme:
the bridge sends the active mode and its --salesos-* values as
context.theme, and again on every switch.
Colours
| Token | Light | Dark | Use |
|---|---|---|---|
background | #F2F1EA | #141414 | Page background |
surface | #FFFFFF | #1E1E1E | Cards |
surfaceHover | #F8F8F6 | #262626 | Hover, input backgrounds |
surfaceMuted | #F0EBD8 | #2E2B22 | Chart backgrounds, progress tracks |
surfaceInverse | #1A1A1A | #303030 | Dark cards, primary buttons |
text | #1A1A1A | #EDEDED | Headings |
textBody | #666666 | #BDBDBD | Body text |
textMuted | #6B6B6B | #A6A6A6 | Captions, placeholders |
accent | #EAD07D | #EAD07D | Fill only — highlights, active states |
accentInk | #7A5F14 | #EAD07D | The accent as text |
successFill / successText | #93C01F / #4F6B0A | #93C01F / #9BCB2B | Progress and tints / success text |
dangerFill / dangerText | #DC2626 / #B91C1C | #DC2626 / #FCA5A5 | Solid error backgrounds / error text |
disabledFill | #4F4F4F | #4F4F4F | Disabled dark buttons (instead of opacity) |
Contrast rules
The package's tests hold every documented pairing to 4.5:1 (3:1 only for
text of 24 px, or 18.66 px bold); CONTRAST_PAIRS lists them.
- The accent is a fill, not an ink. Gold text on white is 1.5:1. When the
accent has to be text on a light surface, use
accentInk. On a dark surface the accent itself reads well. - Light hues stay light on dark surfaces:
successFill,accentand white at 60% are the legible choices onsurfaceInverse; the darkened inks fail there. - Don't dim a card to mean "inactive" — opacity composites every child against the page and drops muted text under 4.5:1. Use a muted background and say "Inactive" in words.
Typography, radii, shadows
- Fonts: Plus Jakarta Sans for headings, Inter for body (
typography.fontFamily). - Radii (px): cards
2xl32 /xl24, inputsmd12, buttons and pillsfull. - Shadows:
smfor cards with a hairlineborder,cardandsoftfor raised panels.