Tokens

Slant / Foundations

Every --sl-* variable, what it drives, and its value in each theme.

Demo

Usage

my-card.css
/* Your own component can read the same tokens, so it follows the theme. */
.my-card {
  padding: var(--sl-space-lg);
  background: var(--sl-surface);
  border: 1px solid var(--sl-line);
  border-radius: var(--sl-radius);
  box-shadow: var(--sl-shadow-sm);
  color: var(--sl-text);
  font: var(--sl-font-size-md)/1.5 var(--sl-font-sans);
  transition: border-color var(--sl-duration-base) var(--sl-ease-out);
}
.my-card button { min-height: var(--sl-control-md); }
.my-card .pixel { background: var(--sl-accent); transform: var(--sl-slant); }

The values come from shared/kit-tokens.json, the one source the stylesheet, the themes list and TUTTNKit's TUTTNTheme are generated from. A contrast gate keeps text, muted text, state colours, primary buttons and text on the tinted backgrounds at 4.5:1 in every theme. The same values are served as tokens.json. See Theming for switching themes and adding your own.

Theme tokens

TokenSageMoonEmberPaperDrives
--sl-bg#11151b#0e1220#1a1310#f4f4efPage background, inputs, the command bar, loader stages
--sl-surface#171c23#151a2b#221915#fcfcf9Cards and menus
--sl-surface-2#1f252e#1d2338#2c211b#eeeee8Secondary buttons, selected tabs and options, tracks
--sl-line#2a313b#283049#3a2c24#e2e2daHairlines and dividers
--sl-line-strong#3a424e#39425f#4d3a2f#cfd0c6Borders of controls
--sl-text#f1f3f5#eef1ff#f7ede6#1b1f19Text
--sl-muted#99a3b1#9aa3c4#bba596#5f645bSecondary text, hints, labels
--sl-accent#abbba1#9db4ff#f1b38a#4f6443Primary buttons, selection, the slanted pixel
--sl-accent-text#11151b#0e1220#1a1310#fcfcf9Text on an accent, success, warning or danger fill
--sl-success#8fd3a8#8fd3a8#8fd3a8#287a4cDone states
--sl-warning#f1c27d#f1c27d#f1c27d#9c6210Attention states
--sl-danger#f0957a#f0957a#f0957a#b5482cErrors, failures and destructive actions
--sl-radius-small6px8px2px7pxButtons, badges, inputs and other small corners
--sl-radius10px14px4px12pxCards, bubbles and other large corners
--sl-radius-large14px20px6px16pxSheets and dialogs
--sl-shadow-sm30% #00000030% #00000030% #0000008% #1b1f19Raised controls and cards
--sl-shadow-md50% #00000050% #00000050% #00000020% #1b1f19Menus and popovers
--sl-shadow-lg60% #00000060% #00000060% #00000026% #1b1f19Dialogs
color-schemedarkdarkdarklightNative scrollbars and form controls

Control heights

Buttons, inputs, segmented controls and chips take their height from --sl-control-sm, -md and -lg. A root's density, or data-density on any element inside one, moves the whole scale.

Density--sl-control-sm--sl-control-md--sl-control-lg
compact26px32px38px
regular (default)28px34px40px
comfortable32px40px46px

Scales

TokenValueDrives
--sl-space-3xs2pxGaps and padding
--sl-space-2xs4px
--sl-space-xs6px
--sl-space-sm8px
--sl-space-md12px
--sl-space-lg16px
--sl-space-xl24px
--sl-space-2xl32px
--sl-font-size-xs11pxLabels (xs) up to stat values (2xl)
--sl-font-size-sm12px
--sl-font-size-md13px
--sl-font-size-lg14px
--sl-font-size-xl18px
--sl-font-size-2xl22px
--sl-duration-fast150msPresses and hovers (fast) up to draws and grows (slower)
--sl-duration-base200ms
--sl-duration-slow300ms
--sl-duration-slower600ms
--sl-ease-outcubic-bezier(.2, .7, .2, 1)out for entrances and indicators, in-out for moves
--sl-ease-in-outcubic-bezier(.4, 0, .2, 1)
--sl-z-dropdown1000z-index of menus, sticky bars, overlays, dialogs, toasts and tooltips
--sl-z-sticky1100
--sl-z-overlay1200
--sl-z-modal1300
--sl-z-toast1400
--sl-z-tooltip1500

Everything else

TokenValueDrives
--sl-accent-softcolor-mix(accent 16%, surface)Tinted backgrounds: accent badges, chosen plans, ranges
--sl-success-softcolor-mix(success 16%, surface)A success tint behind text in --sl-text
--sl-warning-softcolor-mix(warning 16%, surface)A warning tint behind text in --sl-text
--sl-danger-softcolor-mix(danger 16%, surface)A danger tint behind text in --sl-text
--sl-line-fieldcolor-mix(muted 65%, line-strong)The edge of text fields: Input, Textarea, Select, TagInput, TimeField, InputGroup, ShortcutRecorder, PromptInput and MarkdownEditor. It holds 3:1 on bg, surface and surface-2
--sl-tone, --sl-tone-soft, --sl-tone-textfrom data-toneThe colour, tint and on-fill text of the element's tone; components read these instead of a rule per tone
--sl-radius-full999pxPills and round marks
--sl-focus-ring2px solid accent, 2px offsetThe keyboard focus outline on every Slant control
--sl-disabled-opacity0.55Disabled and loading controls
--sl-font-sanssystem-ui, …Body text (the site sets Inter here)
--sl-font-monoui-monospace, …Labels, numbers, code
--sl-slantskewX(9deg)The slanted pixel's transform, matching the TUTTN logo