feat(menu): modernize Menu to Material Design 3 specs#5037
Open
matkoson wants to merge 10 commits into
Open
Conversation
Menu.Item used fixed 48dp height with two-line supporting text and a content minWidth that collapsed trailingSupportingText to zero width. Use minHeight + padding for supporting rows, intrinsic row sizing for trailing slots, and showcase the vibrant color scheme in the example.
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.
Motivation
Modernize
Menu/Menu.Itemto the latest Material Design 3 specs. Reuse theme tokens (shape, typography, motion, color roles) and extract component tokens in the same pattern as Checkbox / FAB / ConnectedButtonGroup.Spec re-check (M3 menus)
Re-checked M3 menus specs and overview:
surfaceContainerLow. Theelevationprop controls shadow only (Paper’selevation.level2maps to different surfaceContainer tones, so it is not used as the menu fill).colorScheme="vibrant"; spring-animated item corner morph as focus/selection moves; optional badge and lightweight submenu portal surface; Menu.Section group gaps (8dp) in addition to Divider.Changes
Tokens / Menu / Menu.Item
surfaceContainerLow; surfacecorner.large; first/last/selected itemcorner.mediumvia layout context (nocloneElement/ nodisplayNamefiltering)labelLarge, supporting + trailing supporting text, selected colors (disabled wins with content opacity)toRawSpring+ reduce-motion snapcolorSchemestandard | vibrantMenu.Sectiongroup gaps; badge; lightweight submenu portal;Animated.springper-corner radius morph on focus/selectionExample / docs / tests
Related issue
Fixes #4977
Test plan
yarn typecheck/yarn lint/ Menu unit testsVisual verification
Docs screenshots:
docs/public/screenshots/menu-*.pngandmenu-ios-*.png.