Repository navigation
feat: refactor icon button component - #5103
Open
alpharius-ck wants to merge 10 commits into
Open
alpharius-ck wants to merge 10 commits into
alpharius-ck wants to merge 10 commits into
Conversation
# Conflicts: # src/components/IconButton/IconButton.tsx # src/components/IconButton/utils.ts # src/components/TextInput/TextInputIcon.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
satya164
reviewed
Oct 22, 2026
satya164
left a comment
Contributor
There was a problem hiding this comment.
Review by Claude
- The migration guide (
docs/6.x/docs/guides/migration.md) has no IconButton section for these breaking changes:mode="contained"to"filled"and"contained-tonal"to"tonal", the numericsizereplaced by named sizes,sizeremoved fromAppbar.ActionandAppbar.BackAction,selected={false}now picking the toggle-off colors (for examplefilledturnssurfaceContainerinstead ofprimary), the removed 6dp margin, andCard.Titlerightprops that can no longer be spread intoIconButton. JavaScript users who still passsize={24}get a crash, becauseIconButtonTokens.sizes[24]isundefinedandgetDimensionsreadsspec.widths. Please add before and after snippets for each.
See the inline comments for the rest. (via Claude, verify if it makes sense)
This was referenced Oct 30, 2026
Port main's IconButton changes into the Material 3 Expressive rewrite: - 48dp hit slop via getMinInteractiveSizeHitSlop, with a hitSlop override (none when disabled or without a touch handler) - role prop, and an image role on web for a labelled, handler-less button - touchable fills the container so content stays centered - touchable clips its own ripple, so the hit slop is not clipped - a disabled icon takes the disabled color over iconColor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collaborator
|
Heads-up: #5107 is merged, and it moves every focus ring onto one shared hook,
If the outline now sits outside the touchable, ring the container the way Button does ( |
Collaborator
The branch is 46 commits behind and has conflicts, so it needs a rebase anyway. Regenerate the snapshots afterwards. |
Take main's shared keyboard focus ring (#5107): - drop src/utils/focusRing.ts and take main's FAB, Switch and Checkbox - drop IconButton's own focus state and ring view; the ring now comes from useFocusRing with 'within' on the clip view, so it surrounds the outline and the touchable no longer draws a second one - keep the theme props on IconButton's TouchableRipple and TextInput.Icon - regenerate snapshots, add IconButton focus ring wiring tests Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
alpharius-ck
requested review from
Doberjohn
and removed request for
JKobrynski
November 16, 2026 14:37
This branch has not been deployed
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
Brings IconButton onto the M3 Expressive spec: XS–XL sizes, narrow/default/wide widths, round/square shapes with press and toggle morph, standard/filled/tonal/outlined colors with a separate toggle-off set, and 0.10 disabled container opacity. Tokens live with the component and reuse theme shape, color and motion tokens. It also uses the shared focus ring and the 48dp touch target from
main.Related issue
https://app.notion.com/p/callstack/Modernize-IconButton-to-Material-3-Expressive-3ac5d027c0f880fcb083e5a909d4d82b
Test plan
Checked the example app on web, iOS and Android.
Screenshots / Videos