

Instead of using warning/danger token values like surface-primary-warning-bg, we just use a single semantic token like surface-primary-bg and change the mode the surface is in to apply danger, success, or warning states. This also means that without having to do extra styling on our form controls, we just change the mode to have the error text turn red and the border turn red. I used this strategy at Figma to handle selection modes on rows that needed to shift icon buttons to be blue when a row was active in the layers panel. At Thatch we're doing it for all tokens, reducing our token definitions significantly. Designers only need to know about 150 tokens, but we have 1000+ different possible values. Strategy from: mode.place
Instead of using warning/danger token values like surface-primary-warning-bg, we just use a single semantic token like surface-primary-bg and change the mode the surface is in to apply danger, success, or warning states. This also means that without having to do extra styling on our form controls, we just change the mode to have the error text turn red and the border turn red. I used this strategy at Figma to handle selection modes on rows that needed to shift icon buttons to be blue when a row was active in the layers panel. At Thatch we're doing it for all tokens, reducing our token definitions significantly. Designers only need to know about 150 tokens, but we have 1000+ different possible values. Strategy from: mode.place
Sign in to join the conversation.
Loading comments...