fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Feat: Semantic Tokens

Open Mitch-At-Work opened this issue 6 months ago • 2 comments

Previous Behavior

Components relied on fluentui/tokens package which used generic level tokens for all components fluentui/tokens was exported as a singular object, causing larger bundle sizes in ESBuild based projects

New Behavior

Components now rely on fluentui/semantic-tokens package which:

  • Enables component level token specificity
  • Provides token fallbacks to generic layer for minimal token definitions
  • Is backwards compatible with existing token definitions, there should be no visual regressions when using existing token sets
  • Provide additional tokens for use outside of fluent components, in a tree shakable manner
  • Internally using flat exported versions of fluentui/tokens to ensure no increased bundle size when using ESBuild

ToDo

  • Move updated semantic styles to useStyle custom hooks so that semantic tokens are opt-in

Mitch-At-Work avatar Apr 14 '25 17:04 Mitch-At-Work