feat(widget): add redesigned amount input cards for jumper modes#776
Draft
effie-ms wants to merge 4 commits into
Draft
feat(widget): add redesigned amount input cards for jumper modes#776effie-ms wants to merge 4 commits into
effie-ms wants to merge 4 commits into
Conversation
|
53fa01e to
9f97fb1
Compare
effie-ms
commented
Jun 17, 2026
| <AmountInput formType="from" sx={marginSx} /> | ||
| ) : null} | ||
| {isJumper ? ( | ||
| <AmountInputCardPair sx={marginSx} /> |
Contributor
Author
There was a problem hiding this comment.
TBD: do we use new inputs cards only for Jumper tiers or everywhere?
be8ef80 to
74478ac
Compare
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.
Which Linear task is linked to this PR?
EMB-452
Why was it implemented this way?
This adds a redesigned amount input as Send/Receive cards, rendered exclusively in the
jumperwidget variant (across itssimpleandadvancedview tiers). All other variants (compact, wide, drawer) continue using the existingSelectChainAndToken+AmountInputunchanged, so the redesign is fully scoped to the jumper variant and carries no regression risk for existing integrators.SendAmountCard): large editable input with adaptive font sizing, token pill selector, percentage chips (25/50/75/Max), fiat/token toggle, and wallet balance display. Percentage chips are shown only when a wallet is connected.ReceiveAmountCard): read-only amount from the best route with fiat/token toggle and token pill selector. The amount is formatted with the samenumberExtprecision as the route cards, and the footer shows the route's price impact (computed viagetPriceImpact, identical toRouteDetails) with an info tooltip. Both footer values and the amount fall back to skeletons while routes are fetching.TokenPillButton): the selected state is a neutral chip-style pill matching the percentage pills; the empty state is derived from the app's primaryButton, so its background/hover/disabled treatment stays in sync with the theme.SwapButton): vertical swap arrow between the cards (hidden when the active tab is in refuel mode), replicatingReverseTokensButtonlogic rather than duplicating it.JumperTabgains an optionalvariant(JumperTabVariant=wide|compact) so each jumper tab can declare its layout;useWideVariantnow resolves the wide layout from the active jumper tab's variant when in thejumpervariant.AmountInputCardPairand rendered conditionally fromMainPagefor thejumpervariant, keeping the existing layout path untouched for other variants.New components
AmountInputCard/—SendAmountCard,ReceiveAmountCard,AmountInputCardPair,PercentageChips,BalanceDisplay,FiatValueToggle, shared stylesSwapButton/— swap arrow with overlapping card designTokenPillButton/— compact pill-shaped token selector (chip-style when selected, primary-button call to action when empty)Visual showcase (Screenshots or Videos)
TODO: add screenshots/GIFs of Send & Receive cards in the jumper variant — simple and advanced tiers (light + dark mode).
Test plan
jumpervariant,simpletier — switch all tabs (Swap & Bridge, Private, Gas)jumpervariant,advancedtier — switch all tabs (Swap, Bridge, Limit)variantdrives the wide/compact layout per jumper tabChecklist before requesting a review