refactor: Update TextField and TextFieldSearch's styling#25684
refactor: Update TextField and TextFieldSearch's styling#25684brianacnguyen merged 5 commits intomainfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
app/component-library/components/Form/TextFieldSearch/TextFieldSearch.tsx
Show resolved
Hide resolved
app/component-library/components/Form/TextField/TextField.stories.tsx
Outdated
Show resolved
Hide resolved
…to update/textfields
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Impacted areas requiring testing:
Not selected:
The risk is medium because while the changes are widespread, they are primarily visual/styling changes and removal of an unused size prop. The component behavior remains the same, just with standardized sizing. Performance Test Selection: |
|
Pull Request is not mergeable



Description
This PR aligns the
TextFieldandTextFieldSearchcomponents with the MetaMask Design System specifications.Key changes:
sizeprop fromTextField- the component now uses a consistent fixed height of 48px, simplifying the API and ensuring design consistency across the appTextFieldstyling: increased border radius (8px → 12px), updated colors to use semantic tokens (background.muted,border.muted), and increased accessory margins (8px → 12px)TextFieldSearchstyling: uses a pill-shaped border radius (24px), larger icons (IconSize.Md), and updated close icon toCircleXTextFieldnow explicitly setsnumberOfLines={1}andmultiline={false}by defaultsize={TextFieldSize.Lg}to use the new simplified APIChangelog
CHANGELOG entry: Updated TextField and TextFieldSearch components to align with the MetaMask Design System
Related issues
Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/MDP/boards/2972?assignee=62afb43d33a882e2be47c36f&quickFilter=3325&selectedIssue=MDP-700
Manual testing steps
Screenshots/Recordings
Before
After
TextField
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-02-04.at.18.00.30.mov
TextFieldSearch
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-02-04.at.18.00.52.mov
Others
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-02-04.at.18.13.37.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches a widely used form primitive and updates default styling/props (including fixed height and focus colors), which could cause subtle visual regressions across many screens; behavior changes are otherwise straightforward and covered by snapshot/test updates.
Overview
Aligns
TextFieldwith updated design-system tokens by removing thesizeAPI and standardizing the component to a fixed 48px height, updated border/background colors, larger corner radius, and increased accessory spacing; it also forces single-line input vianumberOfLines={1}/multiline={false}.Updates
TextFieldSearchto match the new look (pill radius, updated search/clear icons and sizing, and rounded styling via a newTextFieldSearch.styles) and refactors Storybook stories, constants, and unit/snapshot tests accordingly. All consumers that passedsize={TextFieldSize.Lg}are migrated to the simplified API.Written by Cursor Bugbot for commit d7ab35c. This will update automatically on new commits. Configure here.