suiss/uim · Block

Bag Checkout

A three-step checkout screen with delivery, payment and review steps, an order summary and a total in the bottom bar.

Bag Checkout is an open-source mobile screen from suiss/uim for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Bag Checkout on iOS in light mode

A checkout built from Screen, Header with a collapsing large title, RadioGroup, Button, Icon and BottomBar. Delivery and payment are chosen with radio options, finished steps collapse to a one-line summary with an Edit link, and the bottom bar button advances through the steps. The total updates when express delivery is picked, and placing the order shows a confirmation screen with a Start over link.

Installation

$ pnpm dlx @esuiss/uim@latest add bag-checkout

The CLI also adds what it builds on: Bottom Bar, Button, Header, Icon, Radio Group, Screen, Text.

Manual

  1. Install the dependencies:
npx expo install cn phosphor-react-native react-native-reanimated react-native-svg react-native-worklets
  1. Add the pieces it builds on: Bottom Bar, Button, Header, Icon, Radio Group, Screen, Text.

  2. Copy the source into components/blocks/bag-checkout.tsx:

uniwind/components/blocks/bag-checkout.tsx
import { cn } from "cn"
import {
  CheckIcon,
  CreditCardIcon,
  type Icon as PhosphorIcon,
  WalletIcon,
} from "phosphor-react-native"
import * as React from "react"
import { Image, Pressable, View } from "react-native"
import { FadeIn, FadeInDown, ReduceMotion } from "react-native-reanimated"
import { AnimatedView } from "@/components/ui/animated-view"
import { BottomBar, BottomBarContent } from "@/components/ui/bottom-bar"
import { Button } from "@/components/ui/button"
import {
  Header,
  HeaderLargeTitle,
  1. Update the import paths to match your project.

Usage

import { BagCheckout } from "@/components/blocks/bag-checkout"
<BagCheckout />

Replace ITEMS, SHIPPING and PAYMENT with your cart lines and options. Pass onPlaceOrder to receive the chosen shipping, payment and total, and onStartOver to react when the confirmation is dismissed.