Tokens reference
The semantic token contract, with values from Material 3, Carbon and Ant Design.
The semantic tier every design-system pack must provide, in every mode. Generated UIs and renderers only ever reference these names. Values below are each pack's light mode, resolved through its own primitive and system tiers.
The contract also requires 34 contrast pairs (WCAG 2.2 1.4.3 for text, 1.4.11 for graphics) and 4 constraints, such as body text of at least 16px. Check a pack with npm run check-ds -w @polyxd/spec -- path/to/manifest.json.
color
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
color.surface.defaultMain page/app background | #fdf7ff | #ffffff | #ffffff |
color.surface.subtleSlightly differentiated background for grouping (sections, table headers) | #f2ecf4 | #e0e0e0 | #fafafa |
color.surface.raisedBackground of raised containers (cards, sheets) | #f8f2fa | #f4f4f4 | #ffffff |
color.surface.overlayBackground of overlays (dialogs, popovers) | #ece6ee | #f4f4f4 | #ffffff |
color.surface.inverseHigh-contrast inverse background (snackbars, tooltips) | #322f35 | #393939 | #262626 |
color.scrimBackdrop behind modal overlays | #000000 / 0.32 | #000000 / 0.6 | #000000 / 0.45 |
color.text.defaultPrimary text | #1d1b20 | #161616 | #1f1f1f |
color.text.mutedSecondary text: captions, helper text, metadata | #49454e | #525252 | #595959 |
color.text.inverseText on surface.inverse | #f5eff7 | #ffffff | #ffffff |
color.text.linkInline links | #65558f | #0f62fe | #0958d9 |
color.border.defaultDividers and container outlines | #cac4cf | #c6c6c6 | #f0f0f0 |
color.border.strongInput outlines and borders that identify controls (WCAG 1.4.11) | #7a757f | #8d8d8d | #8c8c8c |
color.border.focusKeyboard focus indicator | #625b71 | #0f62fe | #1677ff |
color.action.primary.backgroundThe single most important action | #65558f | #0f62fe | #0958d9 |
color.action.primary.foregroundText/icon on action.primary.background | #ffffff | #ffffff | #ffffff |
color.action.secondary.backgroundSupporting actions | #e8def8 | #393939 | #ffffff |
color.action.secondary.foregroundText/icon on action.secondary.background | #4a4458 | #ffffff | #1f1f1f |
color.action.secondary.borderOutline of secondary actions | #7a757f | #393939 | #d9d9d9 |
color.action.danger.backgroundDestructive or irreversible actions | #ba1a1a | #da1e28 | #d9363e |
color.action.danger.foregroundText/icon on action.danger.background | #ffffff | #ffffff | #ffffff |
color.selection.backgroundSelected option, tab or row | #e8def8 | #e0e0e0 | #e6f4ff |
color.selection.foregroundText/icon on selection.background | #4a4458 | #161616 | #1f1f1f |
color.status.info.backgroundBackground of info messages | #cee5ff | #edf5ff | #e6f4ff |
color.status.info.foregroundText on status.info.background | #004a75 | #161616 | #0958d9 |
color.status.info.emphasisIcon/border/indicator for info on regular surfaces | #00639a | #0043ce | #1677ff |
color.status.success.backgroundBackground of success messages | #a3f69c | #defbe6 | #f6ffed |
color.status.success.foregroundText on status.success.background | #005312 | #161616 | #237804 |
color.status.success.emphasisIcon/border/indicator for success on regular surfaces | #1b6d24 | #24a148 | #389e0d |
color.status.warning.backgroundBackground of warning messages | #ffddb5 | #fcf4d6 | #fffbe6 |
color.status.warning.foregroundText on status.warning.background | #643f00 | #161616 | #874d00 |
color.status.warning.emphasisIcon/border/indicator for warning on regular surfaces | #835400 | #8e6a00 | #ad6800 |
color.status.danger.backgroundBackground of danger messages | #ffdad6 | #fff1f1 | #fff2f0 |
color.status.danger.foregroundText on status.danger.background | #93000a | #161616 | #b32430 |
color.status.danger.emphasisIcon/border/indicator for danger on regular surfaces | #ba1a1a | #da1e28 | #ff4d4f |
color.data.categorical.1Chart series 1 | #6750a4 | #6929c4 | #1677ff |
color.data.categorical.2Chart series 2 | #006b5a | #1192e8 | #d46b08 |
color.data.categorical.3Chart series 3 | #904d00 | #005d5d | #08979c |
color.data.categorical.4Chart series 4 | #00658f | #9f1853 | #eb2f96 |
color.data.categorical.5Chart series 5 | #586400 | #fa4d56 | #389e0d |
color.data.categorical.6Chart series 6 | #984062 | #520408 | #722ed1 |
color.data.positiveIncrease / favourable change in data | #1b6d24 | #24a148 | #389e0d |
color.data.negativeDecrease / unfavourable change in data | #ba1a1a | #da1e28 | #ff4d4f |
color.data.neutralUnchanged or baseline data | #7a757f | #6f6f6f | #8c8c8c |
type
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
type.title.pageTitle of the whole surface | 32px/1.25 400 | 32px/1.25 400 | 30px/1.266667 600 |
type.title.sectionSection headings | 22px/1.2727 400 | 20px/1.4 400 | 20px/1.4 600 |
type.title.itemTitles of cards, list items, dialogs | 16px/1.5 500 | 16px/1.5 600 | 16px/1.5 600 |
type.body.defaultRunning text; must be >= 16px | 16px/1.5 400 | 16px/1.5 400 | 16px/1.5 400 |
type.body.smallSecondary running text | 14px/1.4286 400 | 14px/1.42857 400 | 14px/1.571429 400 |
type.label.defaultControls, form labels, buttons | 14px/1.4286 500 | 14px/1.28572 400 | 14px/1.571429 400 |
type.label.smallChips, badges, table headers | 12px/1.3333 500 | 12px/1.33333 400 | 12px/1.666667 400 |
type.numeric.displayLarge key figures (metrics) | 36px/1.2222 400 | 42px/1.199 300 | 24px/1.333333 400 |
space
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
space.inset.compactPadding inside dense containers | 8px | 8px | 12px |
space.inset.defaultPadding inside containers | 16px | 16px | 16px |
space.inset.comfortablePadding inside spacious containers | 24px | 24px | 24px |
space.stack.tightVertical gap between tightly related items (label and field) | 4px | 8px | 4px |
space.stack.defaultVertical gap between related items | 8px | 16px | 8px |
space.stack.looseVertical gap between loosely related items | 16px | 32px | 16px |
space.stack.sectionVertical gap between sections | 32px | 48px | 32px |
space.inline.tightHorizontal gap within a compound control | 4px | 4px | 4px |
space.inline.defaultHorizontal gap between adjacent items | 8px | 8px | 8px |
space.inline.looseHorizontal gap between groups | 16px | 16px | 16px |
size
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
size.target.minMinimum interactive target size (>= 24px, platform guidance 44-48) | 48px | 48px | 32px |
size.icon.smallSmall icons | 18px | 16px | 12px |
size.icon.defaultDefault icons | 24px | 20px | 14px |
radius
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
radius.smallCorner radius: small | 4px | 0px | 4px |
radius.defaultCorner radius: default | 12px | 0px | 6px |
radius.largeCorner radius: large | 28px | 0px | 8px |
radius.fullCorner radius: full | 9999px | 999999px | 9999px |
border
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
border.width.defaultDefault border width | 1px | 1px | 1px |
border.width.strongEmphasised border width (selected, focused inputs) | 2px | 2px | 2px |
focus
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
focus.ring.widthFocus indicator thickness | 3px | 2px | 3px |
focus.ring.offsetGap between element and focus indicator | 2px | -2px | 1px |
measure
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
measure.maxMaximum line length for running text, in characters (45-75) | 65 | 65 | 65 |
opacity
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
opacity.state.hoverState layer opacity on hover | 0.08 | 0.12 | 0.06 |
opacity.state.pressedState layer opacity when pressed | 0.12 | 0.5 | 0.15 |
opacity.state.focusState layer opacity when focused | 0.12 | 0.12 | 0.1 |
opacity.state.disabledOpacity of disabled content | 0.38 | 0.3 | 0.45 |
shadow
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
shadow.raisedElevation of raised containers | shadow | shadow | shadow |
shadow.overlayElevation of overlays | shadow | shadow | shadow |
motion
| Token | Material 3 | Carbon | Ant Design |
|---|---|---|---|
motion.duration.instantMotion duration: instant | 50ms | 70ms | 100ms |
motion.duration.shortMotion duration: short | 200ms | 110ms | 200ms |
motion.duration.mediumMotion duration: medium | 300ms | 240ms | 300ms |
motion.duration.longMotion duration: long | 500ms | 400ms | 400ms |
motion.easing.standardOn-screen movement | 0.2, 0, 0, 1 | 0.2, 0, 0.38, 0.9 | 0.645, 0.045, 0.355, 1 |
motion.easing.enterElements entering | 0.05, 0.7, 0.1, 1 | 0, 0, 0.38, 0.9 | 0.08, 0.82, 0.17, 1 |
motion.easing.exitElements leaving | 0.3, 0, 0.8, 0.15 | 0.2, 0, 1, 0.9 | 0.78, 0.14, 0.15, 0.86 |
Polyxd is an early preview. Found something unclear? It will get better with your feedback.