Toast: Update Toast to use semantic tokens - #34844
Merged
Mitch-At-Work merged 4 commits intoJul 18, 2025
Merged
Conversation
terynk
force-pushed
the
user/terynkum/toast-semantic-tokens
branch
2 times, most recently
from
July 18, 2025 16:49
94ba346 to
8658201
Compare
Mitch-At-Work
force-pushed
the
user/terynkum/toast-semantic-tokens
branch
from
July 18, 2025 18:57
a924ab7 to
1b77ffd
Compare
|
Pull request demo site: URL |
Mitch-At-Work
approved these changes
Jul 18, 2025
Mitch-At-Work
merged commit Jul 18, 2025
6b8216e
into
microsoft:extended-tokens
10 of 14 checks passed
Mitch-At-Work
added a commit
that referenced
this pull request
Aug 6, 2025
Co-authored-by: Mitch-At-Work <mifraser@microsoft.com>
Mitch-At-Work
added a commit
that referenced
this pull request
Aug 20, 2025
Co-authored-by: Mitch-At-Work <mifraser@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces updates to the
@fluentui/react-toastpackage to enhance its styling by leveraging semantic tokens and improving its modularity. Key changes include the addition of new semantic styles for Toast components, updates to exports for better accessibility, and the introduction of new semantic tokens for consistent theming.Updates to
@fluentui/react-toast:change/@fluentui-react-toast-560606fc-9d0b-489e-9ffe-4f82be76a305.json)ToastContainer,getPositionStyles, andTOAST_POSITIONS, improving modularity and usability of the Toast components. (packages/react-components/react-toast/library/src/index.ts) [1] [2]Introduction of semantic styles:
Toastcomponents, includinguseSemanticToastBodyStyles,useSemanticToastContainerStyles,useSemanticToastFooterStyles,useSemanticToastStyles, anduseSemanticToastTitleStyles. These hooks provide consistent styling across Toast elements. (packages/react-components/semantic-style-hooks-preview/library/src/component-styles/Toast/index.ts)ToastBody,ToastContainer,ToastFooter,ToastTitle, andToast. These styles utilize semantic tokens for properties like font size, line height, colors, and spacing. [1] [2] [3] [4] [5]Semantic tokens updates:
_ctrlToastBackgroundFlyoutLumBlend,_ctrlToastBodyForegroundContentNeutralPrimary,_ctrlToastFooterGapBetweenCtrlDefault, and others, ensuring consistent theming and accessibility. (packages/semantic-tokens/etc/semantic-tokens.api.md) [1] [2] [3]backgroundFlyoutLumBlendandstatusInformativeTintForegroundto include fallback values for better theming support. (packages/semantic-tokens/etc/semantic-tokens.api.md) [1] [2]Integration with semantic style hooks:
SEMANTIC_STYLE_HOOKSobject for integration with the Fluent UI provider. (packages/react-components/semantic-style-hooks-preview/library/src/component-styles/semanticStyleHooks.ts) [1] [2]packages/react-components/semantic-style-hooks-preview/library/src/index.ts)