Skip to content

One size scale, from Figma to code

Luxury Presence · LUX design system

A 56px input next to a 40px button was the visible symptom. The fix went through every interactive component, first in Figma and then in code.

Role
Design Engineer, owner
Duration
April to September 2026
Skills
Design systems, Interaction design, Accessibility, Front end
Tools
Figma, Figma Plugin API, Claude, React, Tailwind CSS
components moved to one scale in Figma
11
instances updated across the library
1,090+
default input height, in pixels
56 → 36
state ramps across the form controls
5 → 1

The problem

Buttons and inputs did not line up. A default button was 40px tall, a default input 56px, and every interactive component had its own size names and its own idea of what small or large meant. Forms looked uneven wherever a button sat next to a field.

Underneath that, each control had its own resting, hover, focus, error and disabled styles, and its own way of attaching a label. On inputs, the resting fill and the hover fill pointed at the same value, so hover was invisible.

One scale

I proposed four sizes shared by every interactive component: buttons, icon buttons, inputs, selects, chips and controls. Each size fixes the height, the padding and the type together, so a 36px button and a 36px input are the same object with different content.

xs · 28ButtonInput
sm · 32ButtonInput
default · 36ButtonInput
lg · 40ButtonInput
The scale, rendered with the site's own tokens. Default is 36px for both buttons and inputs.

Figma first

The library moved before the code did. I scripted the migration with Claude through the Figma Plugin API, in batches by page: chips, then buttons, then inputs, then controls. Eleven components moved to the scale, ending at 712 variants, and more than 1,090 instances across the file updated with them.

Halfway through, after reviewing it with the design team, I shifted the whole scale up by 4px, from 24, 28, 32 and 36 to 28, 32, 36 and 40. That meant rebuilding six components that were already done. It was the right call: 36px is a comfortable default for both a button and an input, and it is cheaper to redo six components than to ship a scale nobody likes.

The cleanup pass found real bugs on the way, like 48 Select and Input variants that had lost their placeholder, and standardized property names so every component reads the same in the properties panel. More than thirty decisions were logged as we went, so the code side would not have to rediscover them.

Then code

In September the same geometry landed in the React components on the next major version, measured variant by variant against Figma.

BeforeAfter
Button40px, 8px radius36px, 10px radius
Icon Button48 / 40 / 32 / 2440 / 36 / 32 / 24
Input56px36px
Select56px36px
State ramps5, one per control1, shared
Labels and errorsWired by hand at each call siteOwned by each control

One state ramp replaced five. Dropping the resting fill from 4% to 2% black made hover visible without touching the hover token. Floating labels were removed, since they only existed to justify the 56px height. And every control now owns its label, helper text and error, instead of relying on a wrapper each team assembled differently.

Accessibility fell out of it

  • Multiselect's input had an empty accessible name. It is named now.
  • Icon Button had no focus indicator. It has one.
  • Disabled buttons now clear 3:1 contrast.
  • Radio groups render a real fieldset and legend.
  • Select's helper text is finally linked to its trigger.

Reflection

This only worked because the same person owned both halves. The Figma migration produced decisions, not just pixels, and the code migration spent them. When the design moved by 4px midway, nothing downstream had to be thrown away, because nothing downstream had started. The height changes reflow every form in the product, so the code ships on the next major version, behind a migration guide.