Design decisions
Use this reference to understand the tradeoffs behind the kit. To build a screen, start with theming, the component’s Props and Blocks.
Maintainers can trace the rationale in design research and the decision record. Decision IDs below link this summary to those records.
Customization direction (D98)
Section titled “Customization direction (D98)”Blocks provide complete mobile host compositions and runnable synthetic demos. Patterns explain payment and KYC behavior; Guides cover general layout and state recipes. Copy and edit blocks in your host app using the same package components.
Start customization with shared semantic tokens, then a scoped family theme where the component supports one. Reuse a named host preset for a product look. Use a one-off instance override only where the component exposes it and the screen needs it. Children and slots control structure. For example, buttons support a family theme and an instance style, fields use PaymentFieldTheme without an instance style, and toasts capture the caller’s scoped themes. See Button customization and Text field customization.
The daily design-system guide links the active rules for contributors.
The connected host checkout example composes review, lost-response recovery and the matching receipt. It pins the priority action, retains one attempt identity and protects a new order from stale callbacks. Persistence, authoritative terms/auth checks and platform effects remain with the host.
Visual direction: Stripe-calm · Hairline
Section titled “Visual direction: Stripe-calm · Hairline”The first version looked like stock Material 3: every section a large rounded card, tinted icon circles on every screen. The owner chose a Stripe-like base on 30 October 2026, and of three options, Hairline became the kit default.
What it takes from Stripe Checkout:
- The order summary has no card: label left, amount right, a hairline only between the items and the total.
- The amount sits near the top, so the customer sees what they pay before the details.
- Payment methods are one bordered list with a 2 px ink outline on the selected row.
- White surface, corners of 6–8 px, amounts in the system sans with tabular figures.
What it keeps from the earlier “Statement” direction, because Stripe shows no public screen for these states:
- A hatched band means unknown; a solid band means pending.
- “Don’t pay again.” comes first on an unknown result.
- One primary action, and never a pay-again on pending or unknown.
- Monospace only for references and virtual account numbers.
Why not all of Stripe: it is the most imitated payment look, its finish depends on Stripe’s own font and brand tuning (the kit ships no fonts), and it has no pattern for the unknown outcome, which is this kit’s main job.




Design constraints
Section titled “Design constraints”- No card by default. A container needs a reason: it is selectable, copyable or dismissible.
- One display-size amount per screen.
- Status uses several signals together: band pattern, tone color, words and an explanation. Strike-through only for failed or canceled.
- Left-align everything in end-user UI.
- One primary action per view, in ink. A 2 px focus outline on keyboard focus, never brand-colored.
- Radii from the scale only: 6 for controls, 8 for a selectable box, 12 for a sheet top.
- Motion only for feedback and state change, zero under reduced motion.
This site follows the same rules: white surface, ink accent, rules instead of cards, small radii, system fonts, monospace for code and references.
Engineering decisions
Section titled “Engineering decisions”- Composition over configuration.
PaymentSheet(header:, body:, footer:)takes widgets, not a config object. - Controlled where the host owns state.
TransactionHistoryand navigation selection are fully controlled;PaymentAccordionItemsupports both modes. - Host verdicts, not UI math.
BalanceCardtakesBalanceState,PromoCodeInputtakesPromoCodeStatus, and a discount reaches the total only as a new host quote. - Media through an adapter.
PaymentVideoControllerkeeps the package free of native plugins. - One package. New modules live in the same package; splitting pays off only once a consumer needs part of it without the rest.
- Out of scope on purpose: real wallets, PIN entry, card storage, ledgers, ad SDKs, real campaigns and tracking.
Large-text pass
Section titled “Large-text pass”At 200% text the status screen’s only action used to fall below the bottom bar. Now the status header grows with text, actions come before the reference rows, and virtual account instructions move after the actions above 1.5× text. The summary headline is dropped above 1.5× because the Total row and the pinned bar already show the total. Label/value rows share a line when they fit.
Performance
Section titled “Performance”The PRD budget is p95 build and raster each under 16.7 ms on a recorded 60 Hz target. On an Android 11 arm64 emulator (profile mode, Impeller on OpenGL ES), checkout at 200% text measured a p95 build of 2.02 ms and a p95 raster of 20.41 ms. A plain Material list with no kit widgets also missed the raster budget in the same session (20.66 ms), which suggests a substantial environment effect but does not prove the kit has no rendering cost. The raster budget is not met in this environment. No physical device was profiled, and there are no iOS performance numbers.
UI review, 1 November 2026
Section titled “UI review, 1 November 2026”On 1 November 2026 the owner reviewed every component and flow against the 8 pt grid and a design-engineering checklist. Each problem became a GitHub issue with annotated “before” captures, and each answer became a decision, D45 to D63a. D64 records the platform scope. The full wording is in the PRD decision table (docs/prd-foundation-components.md), and the implementation notes are in docs/decisions.md.
| Decision | In plain words | Before |
|---|---|---|
| D45 | On a phone, a confirmation is a bottom sheet: full-width actions, the confirm on top and Cancel below. Wide screens get a centred dialog. A phone in landscape still counts as a phone (D92). | #45 |
| D46 | Spacing keeps 4 / 8 / 12 / 16 / 24 / 32. Every gap goes through a named role, and one role uses one value. | #50 |
| D47 | There is no warning button. A warning is a banner, badge or toast next to the action. | Owner decision, no issue |
| D48 | A banner’s actions sit on its text column. A banner about a changed total states old → new and can’t be dismissed while the payment is open. | #52 |
| D48a | One banner layout for every tone: icon and close on the title’s first line, one text column, at most one small button and one link. | #52 |
| D49 | Tooltips open on tap too, and hold one line. Longer explanations open a sheet. | #53 |
| D50 | On a phone, search opens a full-height sheet. Wide screens show a floating list under the field. A phone in landscape still counts as a phone (D92). | #54 |
| D51 | A custom date range opens a kit calendar sheet with Apply at the bottom. | #55 |
| D52 | A single date opens a kit date sheet with a full-width “Choose date”. Date of birth starts with typed entry. | #56 |
| D52a | Far dates, such as a date of birth, use a scrolling wheel; near dates use a month calendar. | #56 |
| D53 | From 600 dp wide, pages sit in a centred column about 640 dp wide. | #57 |
| D54 | One primary button per screen, sheet or dialog. A button that only opens something is secondary. | #61 |
| D55 | On a phone, a menu is a bottom action sheet. Wide screens keep the floating menu. A phone in landscape still counts as a phone (D92). | #61 |
| D56 | In a row, title, value and control share one centre line. In a multi-line row, the icon and control line up with the first line. | #62 |
| D57 | IDs and references in rows are plain monospace text on the value edge with a copy action, not grey chips. | #62 |
| D58 | Charts show the latest exact value at rest; tap or drag to read another point or bar. | #62, #63 |
| D59 | On a phone, only actions that finish or advance the task are full width. Everything else hugs its label. | #63 |
| D59a | On phones, headers hold navigation and optional actions; the priority action belongs in the footer. One action is a “Label ›” link on the title row; more go behind ⋮. Large-text page-link overflow is refined by D83. | #64 |
| D60 | On a phone, table rows read like a property list: label on the left, value on the end edge. | #63 |
| D61 | Sign-in is an account-linking screen: both apps, what the app can and can’t do, one legal sentence and a pinned Continue. | #63 |
| D62 | Every phone screen with a priority action pins it at the bottom, full width, with at most one quiet action. The tab bar hides during a payment; D84 extends this to pushed detail screens. | #64 |
| D63 | History leads with the list at every text size: filters, then the transactions, then the spending chart and the month’s figures. | #58 |
| D63a | History’s date range is a calendar button at the end of the search line, and the range shows as a filter chip. Beside the button, the search shows its label as the placeholder. | #58 |
| D64 | Phase 1 targets iOS (iPhone, iPad) and Android (phones, tablets). Tablets use the wide-screen rules above (D45, D53, D55, D59, D62). Web is the docs site and its gallery preview only, not a product target; desktop is out of scope. The original review used iOS; the documentation phone captures now use Android, and the tablet capture pass is pending. | Owner decision, no issue |
The captures below show the result on an Android phone and a native landscape Android tablet.














D63 and D63a moved history before the chart and put the date range on the search line. D83 moves the Statement link into the header menu when it cannot fit beside the title at large text. D91 then folds the status tabs into a button on the search line on phones at large text, so a whole first row fits at 320 dp too. The captures below show the 360×640 dp Android phone at 200%.


Motion review, 2 November 2026
Section titled “Motion review, 2 November 2026”On 2 November 2026 the kit’s and the example’s motion was reviewed against native iOS and Android behaviour. The decisions are D65 to D80. Tracking issue #93 lists the implementation issues. A row marked “Tracked in” is decided but not shipped yet: the kit behaves this way once that issue closes. The full wording is in the PRD decision table (docs/prd-foundation-components.md), and the reasons are in docs/decisions.md.
| Decision | In plain words | Status |
|---|---|---|
| D65 | Reduced motion follows both the in-app or Android setting and iOS Reduce Motion. Videos don’t autoplay when iOS Auto-Play Video Previews is off. | Current behaviour |
| D66 | Under reduced motion, every kit animation is instant. | Current behaviour for both flags |
| D67 | Kit sheets, dialogs and toasts follow reduced motion. A few Material controls keep their own motion, and the Motion page names them. | Current behaviour |
| D68 | Drawer items never animate. The phone drawer panel keeps its platform slide and edge swipe. | Current behaviour |
| D69 | Full-width status changes fade, and the height eases. Only small elements scale. | Current behaviour |
| D70 | Content rises a fixed 8 dp on every screen. Going back fades without a rise. | Current behaviour |
| D71 | In the example app, going forward rises and going back fades. The outgoing step fades in place in either direction. Restarting or correcting KYC from status is a new forward pass, even to a visited step. Native back gestures inside the flow come later (#107). | Current behaviour inside the payment steps; native back gestures by D93 |
| D72 | The host’s theme decides the press splash. The example turns the ripple off on iOS. | Current behaviour |
| D73 | The kit has no haptic API. The host plays haptics from callbacks it already has, and charts report scrub selection. Material controls keep the SDK’s own tap and long-press feedback (Feedback.forTap, Feedback.forLongPress). |
Current behaviour |
| D74 | Amounts, balances, countdowns and totals change in place. They never count or roll. | Current behaviour |
| D75 | Sheets use curves, not springs. The drag still carries its speed into the release. | Current behaviour |
| D76 | An upload with unknown progress under reduced motion shows a still busy icon, not a made-up percentage. | Current behaviour |
| D77 | The newest toast replaces any toast showing or waiting. | Current behaviour |
| D78 | A reduced-motion change clears the snack bar queue, including the app’s own snack bars. | Current behaviour |
| D79 | On touch, a chart scrub returns to rest on lift; a tap keeps its period until tapped again. | Current behaviour |
| D80 | A host theme’s toast close icon stays inside the toast pill, matching the SDK button. | Current behaviour |
Docs captures, 2 November 2026
Section titled “Docs captures, 2 November 2026”Docs captures moved to Android on 2 November 2026 (issue #130).
| Decision | In plain words | Status |
|---|---|---|
| D81 | Docs captures come from Android only: a 360×640 dp phone at dpr 2 and a 1280×800 dp landscape tablet. Names use android_, replacing D27’s ios_ prefix. D64’s product scope is unchanged. All docs capture registrations and assets use Android. |
Implemented |
| D82 | Phone catalog specimens use a 720 px-wide virtual view with height calculated from measured app-bar and gallery bottom insets to leave the full 1200 dp crop cap visible. Crops use the keyed specimen below the app bar. Overlays and states keep real device size. Flows omit the measured top status inset. Tablet flows use native 1280×800 dp landscape; tablet specimens keep native width and device pixel ratio on the tall virtual view, with the same 1200 dp cap. | Current behaviour |
| D90 | A catalog specimen taller than the 1200 dp cap continues in more images instead of being cut off. The first keeps its name; _part2, _part3 and so on follow in reading order, each at most 1200 dp and repeating the last 64 dp of the one before. Pages show every part after the first image, with “Part n of N” alt text. Extends D82 (#172). |
Current behaviour |
Android pass fixes, 2 November 2026
Section titled “Android pass fixes, 2 November 2026”| Decision | In plain words | Status |
|---|---|---|
| D83 | At large text, when a non-external page link cannot fit beside the title, it becomes the first item in the header’s ⋮ menu (the D55 action sheet on phones), merged with any other actions. At normal text a non-fitting link keeps its own line. External links always keep their own line so the external-navigation cue stays. Refines D59a and D63a. Orchestrator decision C2(b), Android UI pass, 2 Nov 2026 (#141). At 360 dp and 200%, “Transactions” plus “Statement ›” took two header lines and the tab bar cut off the first row’s badge. D63 and D63a were verified on a 375 pt iPhone SE. Moving the link saves about 56 dp; the statement is one tap deeper. No large-text mode (D63). | Current behaviour |
| D84 | On phones, transaction detail, statement, fees and account settings hide the app tab bar, as the payment flow does (D62). Overview and history keep it; Back restores it. The side rail at ≥ 840 dp is unchanged. Aligns with #107. At 360×640 with 3-button navigation this gives detail content about 80 dp back. Orchestrator decision (C3, option a), #142. | Current behaviour |
| D85 | The kit sets no SystemUiOverlayStyle. The example wraps the app in AnnotatedRegion<SystemUiOverlayStyle>: transparent navigation bar and divider, systemNavigationBarContrastEnforced: false, and navigation icon brightness from the resolved app theme. The app bar keeps control of the status bar. Concepts/Theming documents the host pattern. Applies B11. Orchestrator decision C4(a), issue #140. On Android 15+ edge-to-edge, the contrast scrim follows the window theme rather than the in-app ThemeMode, leaving a light strip under dark screens in three-button navigation. System chrome is host-owned (B11). |
Current behaviour |
D83 acceptance measurements (2 Nov 2026)
Section titled “D83 acceptance measurements (2 Nov 2026)”A01 on the Android 17/API 37 phone at 200% app text, system Light. Native dpr 2 is 360×640 dp; PASS_DPR=2.25 is 320×568.9 dp. Positive clearance is above the tab bar; negative clearance is obscured by it. Row clearance includes its bottom padding; badge clearance measures the badge bottom.
| Width | Language | Navigation | Whole first row | Row clearance | Badge clearance |
|---|---|---|---|---|---|
| 360 dp | en | Gesture | Fits | +28.0 dp | +40.0 dp |
| 360 dp | id | Gesture | Fits | +28.0 dp | +40.0 dp |
| 360 dp | en | Three-button | Fits | +4.0 dp | +16.0 dp |
| 360 dp | id | Three-button | Fits | +4.0 dp | +16.0 dp |
| 320 dp | en | Gesture | Does not fit | −37.8 dp | −25.8 dp |
| 320 dp | id | Gesture | Does not fit | −37.8 dp | −25.8 dp |
| 320 dp | en | Three-button | Does not fit | −59.1 dp | −47.1 dp |
| 320 dp | id | Three-button | Does not fit | −59.1 dp | −47.1 dp |
Layer renders and system screenshots: C:/DevTools/android-fixes/pr-df/{gesture|threebutton}_{360|320}_history_{en|id}_light_200_{layer|system}.png. The complete first row fits at 360 dp in both languages and navigation modes. At 320 dp, the badge shortfall is 25.8 dp with gestures and 47.1 dp with three-button navigation, in both languages. The orchestrator approved a draft with these measured gaps and no further layout change in this PR; the owner will open a follow-up for the 320 dp remainder. No large-text mode was added (D63).
History at 320 dp, 3 November 2026
Section titled “History at 320 dp, 3 November 2026”| Decision | In plain words | Status |
|---|---|---|
| D91 | On phones at large text, history’s status tabs become a filter button at the end of the search line, beside the date-range button. It opens the action sheet with every status, the current one checked, and fills with the accent while a status other than All is set. At large text every page header also sits 8 dp closer to its body. Normal text and wide screens keep the tabs. Not a separate large-text mode (D63): the same filters stay one tap away. Refines D63a and D83 (#161). | Current behaviour |
D91 acceptance measurements (3 Nov 2026)
Section titled “D91 acceptance measurements (3 Nov 2026)”A01 on the Android 17/API 37 phone at 200% app text, system Light. Native dpr 2 is 360×640 dp; PASS_DPR=2.25 is 320×568.9 dp. Positive clearance is above the app’s tab bar. Row clearance includes the row’s 12 dp bottom padding; badge clearance measures the badge bottom. English and Indonesian measured the same.
| Width | Navigation | Whole first row | Row clearance | Badge clearance | Before (D83) row / badge |
|---|---|---|---|---|---|
| 320 dp | Three-button | Fits | +4.9 dp | +16.9 dp | −59.1 / −47.1 dp |
| 320 dp | Gesture | Fits | +26.2 dp | +38.2 dp | −37.8 / −25.8 dp |
| 360 dp | Three-button | Fits | +68.0 dp | +80.0 dp | +4.0 / +16.0 dp |
| 360 dp | Gesture | Fits | +92.0 dp | +104.0 dp | +28.0 / +40.0 dp |
The 320 dp gesture row adds the header’s 8 dp to the measured tab-fold result (+18.2 / +30.2 dp); the other rows were measured on the final code.
Phone landscape, 3 November 2026
Section titled “Phone landscape, 3 November 2026”| Decision | In plain words | Status |
|---|---|---|
| D92 | The confirmation, search, menu and focus view pick their phone or wide form from the window’s shorter side. A phone held sideways (640 × 360 dp) keeps the phone sheets; a tablet keeps the wide forms in both orientations. Page layouts, such as footers, tables and the centred column, still follow the width. Amends D45, D50 and D55. On the Android phone in landscape, the width rule ran the search list under the tab bar, let a menu cover its own ⋮ button, and cut a 200% confirmation after two lines. Orchestrator decision, option (a), #147. | Current behaviour |
Flow routes, 3 November 2026
Section titled “Flow routes, 3 November 2026”| Decision | In plain words | Status |
|---|---|---|
| D93 | In the example app, the account pages, history → detail, the KYC steps, KYC status and checkout are separate screens, so the iOS edge swipe and Android’s predictive back preview work there. The payment steps from confirm through the receipt stay on one screen with back guarded: no swipe, back is ignored while authorizing, and leaving an unresolved payment asks first. A screen that is leaving keeps showing what it showed, even when the app has already cleared that data. With reduced motion, screens change without animation. Supersedes D71’s deferral (#107). | Current behaviour |
Open items
Section titled “Open items”From the decision record, still to confirm with the owner: whether expired amounts should be struck through, BalanceCard’s 20 px balance, side padding of rows listed edge to edge, and making the internal type scale public. Hairline and the Lumen/Contrast preset are still close to each other.