Weftv0.4.0
GitHubFigma
Blade AI
Foundations · Naming Convention

Naming Convention

Every value travels one path: a raw value is stored once as a global token, theme tokens alias it by purpose, and components only use theme tokens. Change the global and everything downstream follows.

Token Flow

#token-flow

Every value travels one path: a raw value is stored once as a global token, theme tokens alias it by purpose, and components only use theme tokens. Change the global and everything downstream follows.

Raw value to output

One global token feeds many theme tokens. Spacing and size tokens go to components directly. Rewritten with real tokens from this file.

Raw valueGlobal tokenTheme tokenOutput
#BFE672
--chromatic-lime-300
--interactive-background-primary-default
--surface-background-primary-intense
#BFE672
#E4E4E7
--neutral-zinc-200
--surface-border-gray-muted
--popup-border-gray-subtle
#E4E4E7
#09090B
--neutral-zinc-1000
--surface-text-gray-normal
--interactive-text-gray-normal
#09090B
16px
--spacing-5
No theme token. Used directly by components.
16px

Light & Dark Modes

#modes

A theme token keeps one name but points to a different global token in each mode. Designs and code use the name; the mode picks the value.

One theme token, two global tokens

Each row shows the onLight path above the onDark path. Rewritten with real tokens from this file.

Raw valueGlobal tokenTheme tokenOutput
onLight · #FFFFFF
onDark · #0A0A0A
--neutral-white-500
--neutral-zinc-1100
--surface-background-gray-subtle
LightDark
onLight · #09090B
onDark · #FFFFFF
--neutral-zinc-1000
--neutral-white-500
--surface-text-gray-normal
LightDark
onLight · #E4E4E7
onDark · white a100
--neutral-zinc-200
--neutral-white-a100
--surface-border-gray-muted
LightDark

Naming · Global tokens

#global-tokens

Global tokens are the raw palette and scales. Named by what they are, never where they are used. Theme tokens point at them.

Groups

Pattern: --{tier}-{family}-{step}. Steps run light to dark; a-prefixed steps are alpha.

Group
Pattern
Values
neutral-zinc
--neutral-zinc-{step}
Neutral ramp, 50 to 1100
neutral-white
--neutral-white-{step}
White 500 and alpha a1 to a800
chromatic-lime
--chromatic-lime-{step}
Brand ramp, 50 to 1000
chromatic-green
--chromatic-green-{step}
Positive ramp, 50 to 1000
chromatic-red
--chromatic-red-{step}
Negative ramp, 50 to 1000
chromatic-amber
--chromatic-amber-{step}
Notice ramp, 50 to 1000
chromatic-blue
--chromatic-blue-{step}
Information ramp, 50 to 1000
chromatic-orange
--chromatic-orange-{step}
Single step: 600
elevation
--elevation-{level}
Shadow effect: mid-raised

All 9 rows rewritten to Blade structure. Old global-colors/... and global-sizes/size-N names, the purple ramp and the size-00 to size-360 scale are not in this file.

Naming · Foundation

#foundation

Foundation tokens describe non-colour scales: spacing, size, radius, border width, opacity and type. Named by property, then a step. One value mode.

Groups

Pattern: --{property}-{step}. Numeric steps are Blade scale ids, not pixel values; read the value from the token.

Group
Pattern
Steps
spacing
--spacing-{n}
0 to 17 · 0 to 96px
size
--size-{n}
3 to 78, 240
border-width
--border-width-{n}
Hairline and stroke widths
border-radius
--border-radius-{size}
none to xlarge, max, round
opacity
--opacity-{n}
0, 50, 100, 600, 1300
typography-fonts-family
--typography-fonts-family-{role}
text, code
typography-fonts-size
--typography-fonts-size-{n}
75, 100, 200, 400, 800, 1200
typography-fonts-weight
--typography-fonts-weight-{name}
light 300 to bold 700
typography-line-heights
--typography-line-heights-{n}
50, 100, 400, 800, 1200, 1300
typography-letter-spacings
--typography-letter-spacings-{n}
25, 50, 100, 200

All 10 rows rewritten (old spacing/4, radius/md, font-size/sm style). Old ring-width, icon-size, container, grid-gap and motion groups have no tokens in this file and are dropped.

Naming · Theme

#theme

Theme tokens are the semantic colours every component uses, named {group}-{property}-{intent}-{emphasis|state}. onLight and onDark decide which global colour each points to.

Groups

Pattern: --{group}-{property}-{intent}-{emphasis|state}. Group, then property (background, text, border, icon), then intent, then emphasis or state.

Group
Example token
Use
surface
--surface-background-gray-subtle
Page, panels, text, hairlines
interactive
--interactive-background-primary-default
Buttons, fields, links, options
feedback
--feedback-background-positive-subtle
Success, error, notice, info states
popup
--popup-border-gray-subtle
Menus and popover panels

All 4 rows rewritten. Old action, content, line, state, effect, chart and sidebar groups fold into these four or have no token yet.

Modes · onLight and onDark

The same name points to a different global token in each mode. Values read from the token descriptions.

Token
onLight
onDark
--surface-background-gray-subtle
neutral.white.500
neutral.zinc.1100
--surface-text-gray-normal
neutral.zinc.1000
neutral.white.500
--surface-text-gray-muted
neutral.zinc.550
neutral.white.a800
--surface-border-gray-muted
neutral.zinc.200
neutral.white.a100
--interactive-background-primary-default
chromatic.lime.300
chromatic.lime.300
--popup-background-gray-subtle
neutral.white.500
neutral.zinc.900

All 6 rows rewritten to real tokens in this file (old surface/background, line/border, action/primary rows replaced).

Naming · Size

#size

Size tokens are global dimensions. Component-level control tokens (control-*, button-*, input-*) are not part of Weft New: the old rows are dropped and listed below.

Groups

Components take dimensions from Global spacing and size tokens directly. There is no per-component size group.

Group
Pattern
Use
spacing
--spacing-{n}
Padding, gap and inset
size
--size-{n}
Width and height of controls, icons, containers
border-width
--border-width-{n}
Hairline and stroke widths

All 3 rows rewritten. Old control/{xs,sm,md,lg} rows are dropped (see below).

Dropped from the old file

Component-level tokens are not used in Weft New. These rows were removed, not ported.

Old token
Reason
control/{xs,sm,md,lg}/{property}
Component-level (control-*): use spacing and size tokens
global/is-{desktop,mobile}
Platform flag with no Desktop and Mobile modes here

Naming · Layout

#layout

Layout tokens describe the page grid per breakpoint. None exist in this file yet: names are kept from the old file and marked UNDEFINED · needs decision.

GroupsNeeds decision

Three groups, each needing Mobile, Tablet and Desktop values. Grid spacing can alias --spacing-5 and --spacing-7.

Token (proposed)
Value
Purpose
breakpoint-min-width
UNDEFINED · needs decision
Width where a mode starts
frame-width
UNDEFINED · needs decision
Default artboard width per mode
grid-columns
UNDEFINED · needs decision
Column count
grid-gutter
UNDEFINED · needs decision
Gutter between columns
grid-margin
UNDEFINED · needs decision
Margin at the page edge

All 5 rows rewritten to {property}-{step} names. No breakpoint or container tokens exist in this file.

Modes · Mobile, Tablet and DesktopNeeds decision

Values carried over from the old file. Gutter and margin map to existing spacing tokens.

Token (proposed)
Mobile
Tablet
Desktop
breakpoint-min-width
0
768
1024
frame-width
360
768
1440
grid-columns
4
8
12
grid-gutter
--spacing-5 · 16
--spacing-5 · 16
--spacing-5 · 16
grid-margin
--spacing-5 · 16
--spacing-5 · 16
--spacing-7 · 24

5 rows. Token names are UNDEFINED · needs decision; breakpoint, frame and column values have no token yet.

Naming · Styles

#styles

Text and effect roles bundle size, line height and tracking tokens. Named by role; values come from the typography tokens used on the doc pages.

Groups

Role, then the size, line-height and tracking tokens it uses. Size ids are --typography-fonts-size-{n}, line heights --typography-line-heights-{n}, tracking --typography-letter-spacings-{n}.

Role
Size
Line height
Tracking
Page title
800 · 48px
800 · 56px
25 · -0.03em
Section heading
400 · 20px
1300 · 28px
50 · -0.01em
Subtitle
200 · 16px
400 · 26px
100 · 0em
Body
100 · 14px
1200 · 22px
100 · 0em
Label
1200 · 13px
100 · 20px
100 · 0em
Caption
75 · 12px
50 · 16px
200 · +0.01em
Elevation
--elevation-mid-raised
effect style
none

All 7 rows rewritten. Old heading/h1-h4, body/sm-medium, ui/button-* and code/sm style names are dropped; no named text styles exist in this file. Weights are set per role on the Typography page.