Skip to main content

Checkout Pro

One screen from the bag to Pay: the order, the address, delivery speed as radio buttons, the payment method, a promo code, and totals with tax that update as you choose, in your currency. The pay button is busy until onPay resolves. Try the code SAVE10.

import { CheckoutScreen } from '@patine-ui/pro';
Loading…
<CheckoutScreen
  items={CHECKOUT_ITEMS}
  shippingOptions={SHIPPING_OPTIONS}
  address="Rua Augusta 12, Lisbon"
  paymentMethod="Visa ·· 4242"
  taxRate={0.08}
  onApplyPromo={(code) => (code.toUpperCase() === 'SAVE10' ? 1000 : null)}
  onPay={() => wait(900)}
/>

Make it yours​

PropTypeDefault
items{ id, name, variant?, quantity, price }[], prices in centsRequired
shippingOptions{ id, title, … }[]Required
address, paymentMethodstringRequired
taxRatenumber: 0.23 for 23%0
currency, localeISO 4217, BCP 47'USD', the device's
onApplyPromo(code) => cents | nullNo promo field
onPay({ shippingId, totals }) => void | Promise<void>Required
onEditAddress, onEditPayment, onBack() => voidNone

For a multi-step checkout, see Ouro's, built on the Wizard.

Built from the free List, RadioGroup, TextField and Header.

In real apps​

Every complete app has its own version of this screen, wired to its auth, data and settings: see the templates.