Pre-alphaThe registry and the CLI are not published yet.Roadmap

Component tokens

Per-component colors and shape, derived from the semantic colors and the tokens.

Draft

The values and key names shown here are conceptual and may change.

Components is the last layer of the theme. It gives each component its own named colors — the background of a solid button, the border of a focused input, the track of a checked switch — and, for controls, its corner radius.

Components read this layer, never colors or the palette directly.

  1. 01Tokens

    The palette step.

    blue.500
  2. 02ThemeColors

    The semantic color pointing to it.

    border.focus
  3. 03Components

    The component token reading the color.

    input.outline.focused.border
  4. 04Your components

    Button, Input, Switch… read this layer only.

Each row below traces a real component token back to its semantic color and palette step, in both schemes.

palette (light / dark)
ThemeColors
Components
yellow.500light
yellow.500dark
→
highlight.default
→
badge.highlight.default.background
blue.500light
blue.400dark
→
border.focus
→
input.outline.focused.border
gray.950light
gray.50dark
→
primary.default
→
button.solid.default.background

Why a separate layer

Say a button reads a semantic color directly:

backgroundColor: colors.primary.default;

Now you want blue buttons, and nothing else should change. You have two bad options:

  • change primary.default: selected chips, switches and checkboxes turn blue too;
  • hardcode a color in the button file: dark mode stops following.

With component tokens, the button reads button.solid.default.background. You point that one token to another semantic color, and only the button changes. Dark mode still works because the value still comes from ThemeColors.

Switch between the default and the custom button below. The checkbox and the switch keep the primary color, and the link and the focused input stay blue; only the solid button follows the change.

button.solid.default.background:colors.primary.default

The layer also:

  • puts every component color in one file, instead of spread across dozens of components;
  • keeps the stylesheet, unistyles, nativewind and uniwind variants identical, since all four take the same value.

What goes in

Component tokens hold what a theme changes: the colors, which change between light and dark or with your brand, and the radius of controls, which sets the character of an app.

In ComponentsElsewhere
Background, foreground, border, icon, placeholder, track, thumbHeights, padding, font sizes: read from tokens
One value per variant and stateMinimum tap target (44pt): metrics
radius of Button, IconButton, FloatingButton, Chip, Input and SegmentedControlState logic, gestures, animation: core and hooks

Structure

Every token follows the same path:

<component>.<variant>.<state>.<property>
SegmentRuleExamples
componentcamelCase, same name as in the registrybutton, iconButton, segmentedControl
variantThe values of the variant prop. Components without one use defaultsolid, outline, ghost
stateA closed list, always starting with defaultdefault, pressed, focused, checked, invalid, disabled
propertyA shared vocabularybackground, foreground, border, placeholder, icon, indicator, track, thumb

States other than default only list what changes. A missing property falls back to default: a pressed outline button keeps its border and text color and only changes its background.

theme/components/button.ts
type ButtonColors = {
	background?: string;
	foreground: string;
	border?: string;
};
type ButtonStates = States<ButtonColors, "pressed" | "disabled">;

export type ButtonTokens = {
	/** Corner radius. `tokens.radius.full` makes a pill. */
	radius: number;
	solid: ButtonStates;
	outline: ButtonStates;
	ghost: ButtonStates;
};

States comes from the theme: default is complete, every other state is a Partial of it. radius sits next to the variants, since every variant shares it.

A component reads its colors with stateColors, from the same file. It starts from default, then applies each state the component is in, in the order they are listed:

const colors = stateColors(
	theme.components.chip[variant],
	selected && "selected",
	disabled && "disabled",
);

A selected, disabled chip keeps the background of selected and takes the text color of disabled.

One file per component, inside the theme

Each component brings its tokens in its own file. axiom add button copies it to theme/components/button.ts, not next to the component.

It lives there because the theme is its only reader: a component never imports its own tokens file, it reads components.button from useTheme(). Keeping it in the theme means the foundations never import from the components layer, and everything you tune in a theme sits in one folder.

The file exports a pure function of the semantic colors and the tokens:

theme/components/button.ts
export const buttonTokens = (
	colors: ThemeColors,
	tokens: Tokens,
): ButtonTokens => ({
	radius: tokens.radius.md,
	solid: {
		default: {
			background: colors.primary.default,
			foreground: colors.primary.on,
		},
		pressed: { background: colors.primary.pressed },
		disabled: {
			background: colors.border.default,
			foreground: colors.content.disabled,
		},
	},
	outline: {
		default: {
			background: colors.background.default,
			foreground: colors.content.default,
			border: colors.border.default,
		},
		pressed: { background: colors.background.subtle },
		disabled: {
			foreground: colors.content.disabled,
			border: colors.border.subtle,
		},
	},
	ghost: {
		default: { foreground: colors.content.default },
		pressed: { background: colors.background.subtle },
		disabled: { foreground: colors.content.disabled },
	},
});

Rules:

  • The function is pure. It reads colors for colors and tokens for shape. Never write raw values or palette steps in it.
  • Never branch on the scheme (if (dark)). If a component needs a different value in dark mode, that difference belongs in ThemeColors.

components(colors, tokens)

theme/components/index.ts gathers every tokens file of the project. You don’t write it by hand: npx axiom add <component> copies the tokens file into the folder and registers it between two pairs of markers.

theme/components/index.ts
// axiom:imports:start
import { bottomSheetTokens } from "./bottom-sheet";
import { buttonTokens } from "./button";
// axiom:imports:end

export const components = (colors: ThemeColors, tokens: Tokens) => ({
	// axiom:components:start
	bottomSheet: bottomSheetTokens(colors, tokens),
	button: buttonTokens(colors, tokens),
	// axiom:components:end
});

export type Components = ReturnType<typeof components>;
  • The key is the component name in camelCase, the function is <key>Tokens.
  • The CLI only adds missing lines, and only when the tokens file is in the project. It never removes or rewrites a line.
  • Keep the markers. Without them, add stops and asks you to copy the theme again. It stops too when components still takes only colors, as in themes copied before shape tokens.
  • Removing a component: delete its two lines, then theme/components/<name>.ts and the component itself.

components is called once per color scheme:

theme/theme.ts
export const light = {
	tokens,
	colors: lightColors,
	components: components(lightColors, tokens),
} satisfies Theme;
export const dark = {
	tokens,
	colors: darkColors,
	components: components(darkColors, tokens),
} satisfies Theme;

Default values

Each table lists a component’s color tokens, the semantic color they read and the result in both schemes. Grayed rows are states that override default.

The radius of the controls:

Componentradius
buttontokens.radius.md
iconButtontokens.radius.md, for the square shape
floatingButtontokens.radius.full
chiptokens.radius.full
inputtokens.radius.md
segmentedControltokens.radius.md

Button

token
reads
light
dark
button.solid.default.background
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
button.solid.default.foreground
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
button.solid.pressed.background
primary.pressed
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
button.solid.disabled.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
button.solid.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
button.outline.default.background
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)
button.outline.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
button.outline.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
button.outline.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
button.outline.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
button.outline.disabled.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
button.ghost.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
button.ghost.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
button.ghost.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
button.destructive.default.background
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
button.destructive.default.foreground
content.inverse
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
button.destructive.pressed.foreground
feedback.errorSubtle
hsla(7, 100%, 97%, 1)
hsla(359, 100%, 14%, 1)
button.destructive.disabled.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
button.destructive.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

FloatingButton

token
reads
light
dark
floatingButton.solid.default.background
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
floatingButton.solid.default.foreground
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
floatingButton.solid.pressed.background
primary.pressed
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
floatingButton.solid.disabled.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
floatingButton.solid.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
floatingButton.tinted.default.background
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
floatingButton.tinted.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
floatingButton.tinted.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
floatingButton.tinted.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
floatingButton.tinted.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

IconButton

token
reads
light
dark
iconButton.ghost.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
iconButton.ghost.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
iconButton.ghost.selected.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
iconButton.ghost.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
iconButton.tinted.default.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
iconButton.tinted.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
iconButton.tinted.pressed.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
iconButton.tinted.selected.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
iconButton.tinted.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
iconButton.outline.default.background
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)
iconButton.outline.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
iconButton.outline.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
iconButton.outline.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
iconButton.outline.selected.border
border.focus
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
iconButton.outline.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
iconButton.outline.disabled.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
iconButton.solid.default.background
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
iconButton.solid.default.foreground
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
iconButton.solid.pressed.background
primary.pressed
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
iconButton.solid.selected.background
primary.pressed
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
iconButton.solid.disabled.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
iconButton.solid.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

Input

Also used by TextArea, and by InputGroup for its border, text and placeholder.

token
reads
light
dark
input.outline.default.background
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)
input.outline.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
input.outline.default.text
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
input.outline.default.placeholder
content.subtle
hsla(240, 2%, 65%, 1)
hsla(240, 2%, 48%, 1)
input.outline.default.affix
content.muted
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
input.outline.default.caret
content.link
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
input.outline.focused.border
border.focus
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
input.outline.invalid.border
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
input.outline.invalid.caret
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
input.outline.disabled.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
input.outline.disabled.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
input.outline.disabled.text
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
input.outline.disabled.affix
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
input.filled.default.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
input.filled.default.text
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
input.filled.default.placeholder
content.subtle
hsla(240, 2%, 65%, 1)
hsla(240, 2%, 48%, 1)
input.filled.default.affix
content.muted
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
input.filled.default.caret
content.link
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
input.filled.focused.border
border.focus
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
input.filled.invalid.border
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
input.filled.invalid.caret
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
input.filled.disabled.text
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
input.filled.disabled.affix
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

Switch

token
reads
light
dark
switch.default.default.track
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
switch.default.default.thumb
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
switch.default.checked.track
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
switch.default.disabled.track
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)

Checkbox

token
reads
light
dark
checkbox.default.default.border
border.strong
hsla(240, 2%, 65%, 1)
hsla(240, 2%, 48%, 1)
checkbox.default.default.indicator
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
checkbox.default.checked.background
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
checkbox.default.checked.border
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
checkbox.default.invalid.border
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
checkbox.default.disabled.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
checkbox.default.disabled.indicator
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

Radio

token
reads
light
dark
radio.default.default.border
border.strong
hsla(240, 2%, 65%, 1)
hsla(240, 2%, 48%, 1)
radio.default.default.indicator
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
radio.default.checked.border
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
radio.default.disabled.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
radio.default.disabled.indicator
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

SegmentedControl

token
reads
light
dark
segmentedControl.default.default.track
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
segmentedControl.default.default.indicator
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
segmentedControl.default.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
segmentedControl.default.default.foreground
content.muted
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
segmentedControl.default.selected.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
segmentedControl.default.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

Slider

token
reads
light
dark
slider.default.default.track
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
slider.default.default.fill
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
slider.default.default.thumb
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
slider.default.disabled.fill
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
slider.default.disabled.thumb
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

InputGroup

token
reads
light
dark
inputGroup.default.default.addon
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
inputGroup.default.default.divider
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
inputGroup.default.disabled.divider
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)

InputOTP

token
reads
light
dark
inputOtp.default.default.background
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)
inputOtp.default.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
inputOtp.default.default.text
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
inputOtp.default.default.caret
content.link
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
inputOtp.default.active.border
border.focus
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
inputOtp.default.invalid.background
feedback.errorSubtle
hsla(7, 100%, 97%, 1)
hsla(359, 100%, 14%, 1)
inputOtp.default.invalid.border
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
inputOtp.default.invalid.text
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
inputOtp.default.success.background
feedback.successSubtle
hsla(124, 58%, 95%, 1)
hsla(135, 100%, 9%, 1)
inputOtp.default.success.border
feedback.success
hsla(135, 59%, 49%, 1)
hsla(130, 56%, 62%, 1)
inputOtp.default.success.text
feedback.success
hsla(135, 59%, 49%, 1)
hsla(130, 56%, 62%, 1)
inputOtp.default.disabled.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
inputOtp.default.disabled.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
inputOtp.default.disabled.text
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

Chip

token
reads
light
dark
chip.outline.default.background
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)
chip.outline.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
chip.outline.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
chip.outline.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
chip.outline.selected.background
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
chip.outline.selected.foreground
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
chip.outline.selected.border
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
chip.outline.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)
chip.outline.disabled.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
chip.filled.default.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
chip.filled.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
chip.filled.pressed.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
chip.filled.selected.background
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
chip.filled.selected.foreground
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
chip.filled.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

Badge

token
reads
light
dark
badge.neutral.default.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
badge.neutral.default.foreground
content.muted
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
badge.highlight.default.background
highlight.default
hsla(48, 100%, 50%, 1)
hsla(48, 100%, 50%, 1)
badge.highlight.default.foreground
highlight.on
hsla(240, 4%, 14%, 1)
hsla(240, 4%, 14%, 1)
badge.info.default.background
feedback.infoSubtle
hsla(218, 100%, 96%, 1)
hsla(215, 100%, 15%, 1)
badge.info.default.foreground
feedback.info
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
badge.success.default.background
feedback.successSubtle
hsla(124, 58%, 95%, 1)
hsla(135, 100%, 9%, 1)
badge.success.default.foreground
feedback.success
hsla(135, 59%, 49%, 1)
hsla(130, 56%, 62%, 1)
badge.warning.default.background
feedback.warningSubtle
hsla(25, 100%, 96%, 1)
hsla(31, 100%, 12%, 1)
badge.warning.default.foreground
feedback.warning
hsla(35, 100%, 50%, 1)
hsla(29, 99%, 68%, 1)
badge.error.default.background
feedback.errorSubtle
hsla(7, 100%, 97%, 1)
hsla(359, 100%, 14%, 1)
badge.error.default.foreground
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
badge.outline.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
badge.outline.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
badge.inverse.default.background
background.inverse
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
badge.inverse.default.foreground
content.inverse
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
badge.count.default.background
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
badge.count.default.foreground
content.inverse
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
badge.count.default.border
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)

Avatar

token
reads
light
dark
avatar.default.default.background
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
avatar.default.default.foreground
content.muted
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
avatar.default.default.ring
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)
avatar.status.default.online
feedback.success
hsla(135, 59%, 49%, 1)
hsla(130, 56%, 62%, 1)
avatar.status.default.away
feedback.warning
hsla(35, 100%, 50%, 1)
hsla(29, 99%, 68%, 1)
avatar.status.default.busy
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
avatar.status.default.offline
content.subtle
hsla(240, 2%, 65%, 1)
hsla(240, 2%, 48%, 1)

Card

token
reads
light
dark
card.elevated.default.background
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
card.elevated.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
card.outlined.default.background
background.default
hsla(0, 0%, 100%, 1)
hsla(0, 0%, 0%, 1)
card.outlined.default.border
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
card.outlined.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
card.filled.default.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
card.filled.pressed.background
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)

Item

token
reads
light
dark
item.default.default.divider
border.default
hsla(240, 2%, 82%, 1)
hsla(240, 2%, 30%, 1)
item.default.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
item.default.selected.background
feedback.infoSubtle
hsla(218, 100%, 96%, 1)
hsla(215, 100%, 15%, 1)

Skeleton

token
reads
light
dark
skeleton.default.default.background
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
skeleton.default.default.highlight
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)

Alert

token
reads
light
dark
alert.info.default.background
feedback.infoSubtle
hsla(218, 100%, 96%, 1)
hsla(215, 100%, 15%, 1)
alert.info.default.icon
feedback.info
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
alert.success.default.background
feedback.successSubtle
hsla(124, 58%, 95%, 1)
hsla(135, 100%, 9%, 1)
alert.success.default.icon
feedback.success
hsla(135, 59%, 49%, 1)
hsla(130, 56%, 62%, 1)
alert.warning.default.background
feedback.warningSubtle
hsla(25, 100%, 96%, 1)
hsla(31, 100%, 12%, 1)
alert.warning.default.icon
feedback.warning
hsla(35, 100%, 50%, 1)
hsla(29, 99%, 68%, 1)
alert.error.default.background
feedback.errorSubtle
hsla(7, 100%, 97%, 1)
hsla(359, 100%, 14%, 1)
alert.error.default.icon
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
alert.neutral.default.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
alert.neutral.default.icon
content.muted
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
alert.neutral.default.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)

Empty

token
reads
light
dark
empty.neutral.default.media
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
empty.neutral.default.icon
content.muted
hsla(240, 2%, 48%, 1)
hsla(240, 2%, 65%, 1)
empty.error.default.media
feedback.errorSubtle
hsla(7, 100%, 97%, 1)
hsla(359, 100%, 14%, 1)
empty.error.default.icon
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)

Toast

token
reads
light
dark
toast.default.default.background
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
toast.default.default.border
border.subtle
hsla(240, 2%, 91%, 1)
hsla(240, 3%, 20%, 1)
toast.default.default.icon
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
toast.default.success.icon
feedback.success
hsla(135, 59%, 49%, 1)
hsla(130, 56%, 62%, 1)
toast.default.error.icon
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
toast.default.info.icon
feedback.info
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)

Snackbar

token
reads
light
dark
snackbar.default.default.background
background.inverse
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
snackbar.default.default.foreground
content.inverse
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
snackbar.default.default.action
feedback.info
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)

Calendar

token
reads
light
dark
calendar.day.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
calendar.day.default.range
feedback.infoSubtle
hsla(218, 100%, 96%, 1)
hsla(215, 100%, 15%, 1)
calendar.day.default.dot
content.link
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
calendar.day.pressed.background
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
calendar.day.today.foreground
content.link
hsla(211, 100%, 50%, 1)
hsla(215, 98%, 65%, 1)
calendar.day.selected.background
primary.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
calendar.day.selected.foreground
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
calendar.day.selected.dot
primary.on
hsla(0, 0%, 100%, 1)
hsla(240, 4%, 14%, 1)
calendar.day.inRange.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
calendar.day.outside.foreground
content.subtle
hsla(240, 2%, 65%, 1)
hsla(240, 2%, 48%, 1)
calendar.day.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

BottomSheet

token
reads
light
dark
bottomSheet.default.default.background
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
bottomSheet.default.default.handle
border.strong
hsla(240, 2%, 65%, 1)
hsla(240, 2%, 48%, 1)

Dialog

token
reads
light
dark
dialog.default.default.background
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
token
reads
light
dark
menu.default.default.background
background.elevated
hsla(0, 0%, 100%, 1)
hsla(240, 3%, 20%, 1)
menu.default.default.separator
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
menu.default.default.foreground
content.default
hsla(240, 4%, 14%, 1)
hsla(0, 0%, 96%, 1)
menu.default.pressed.item
background.subtle
hsla(0, 0%, 96%, 1)
hsla(240, 4%, 14%, 1)
menu.default.destructive.foreground
feedback.error
hsla(3, 100%, 59%, 1)
hsla(6, 99%, 69%, 1)
menu.default.disabled.foreground
content.disabled
hsla(240, 3%, 73%, 1)
hsla(240, 2%, 39%, 1)

Each table is the default tokens file of the component. A project only has the tokens of the components it added.

In each styling variant

The values are the same; only the way components read them changes.

stylesheet
const theme = useTheme();

<Pressable
	style={{ backgroundColor: theme.components.button.solid.default.background }}
/>;
unistyles
const styles = StyleSheet.create((theme) => ({
	solid: { backgroundColor: theme.components.button.solid.default.background },
}));
nativewind and uniwind
// `bg-button-solid` is `solid.default.background`, declared in theme/components/button.css.
<Pressable className="flex-row items-center bg-button-solid active:bg-button-solid-pressed" />;

With NativeWind and Uniwind, a component’s tokens are CSS: each one becomes a Tailwind name. solid.pressed.background of the button is --color-button-solid-pressed, so bg-button-solid-pressed; a foreground gives text-button-solid-foreground, and radius gives rounded-button. Each one points to a theme color, so it follows light and dark.

Switch, Slider, Segmented Control and Skeleton animate their colors, so they keep their tokens in TypeScript in every variant.

Customizing

Edit the tokens file of the component. It belongs to your project, like the component itself:

theme/components/button.ts — blue pill buttons
radius: tokens.radius.full,
solid: {
  default: {
    background: colors.content.link,
    foreground: colors.content.inverse,
  },
  pressed: { background: colors.content.link },
},

With NativeWind or Uniwind, the same change goes in the CSS file:

theme/components/button.css — blue pill buttons
--radius-button: var(--radius-full);
--color-button-solid: var(--color-content-link);
--color-button-solid-foreground: var(--color-content-inverse);
--color-button-solid-pressed: var(--color-content-link);

Pick the layer that matches the scope of the change:

You want to changeEdit
One componentIts tokens file (theme/components/button.ts, or button.css with NativeWind and Uniwind)
Every action (buttons, selected and checked controls)primary
A role across the app (every border, every link)ThemeColors
The brand hue or a step everywhereThe palette

npx axiom add button asks before overwriting a tokens file you changed.