UI kit
One component library on every platform, built on the SDK of the same platform.
Platforms
| Platform | Package |
|---|---|
| Flutter | sapp_ui |
| Web | @superrouteca/sapp-ui |
| React | @superrouteca/sapp-react/ui |
| React Native | @superrouteca/sapp-react-native/ui |
| SwiftUI (iOS, macOS) | SAppUI |
| Jetpack Compose (Android) | sapp-ui-android |
| WPF | Superroute.SApp.Wpf |
| WinForms | Superroute.SApp.WinForms |
Rules for every component
- A component calls only the SDK client it is given and never calls the network itself.
- Every component that loads shows loading, loaded, empty and error states; an error offers Try again.
- A component raises events and never navigates.
- Every component also reports each failed call to the app: sr-error on the web, onError on React, React Native, Flutter, SwiftUI and Jetpack Compose (and on SuperrouteScope), and the ErrorOccurred event in .NET, with the code, message, status, request id and the seconds to wait.
- Colours, radius, spacing and type come from the service provider's branding.
- On SwiftUI, Jetpack Compose, WPF and WinForms the theme tokens take a light, dark or automatic mode (automatic follows the device) and a corner radius, set by the app or read from the service provider's branding.
- Strings in 14 languages, chosen by the client's locale, with English as the fallback.
- Money is shown with two decimals and the currency code.
- Every control has a label, text follows the system size and touch targets are at least 44 × 44 points.
SuperrouteScope(
client: sr,
theme: ThemeTokens.fromBranding(bootstrap['client']['settings']['branding']),
onSignInRequired: () => router.go('/sign-in'),
onError: (error) => log(error.code, error.requestId, error.retryAfter),
child: SrOrderList(onOpen: (type, id) => router.go('/orders/$type/$id')),
)
document.addEventListener('sr-error', (event) => {
const { code, message, status, requestId, retryAfter } = event.detail;
});
Components
On SwiftUI, Jetpack Compose, React, React Native, WPF and WinForms a component has the name in the first column.
The pickup list and the locker map are in the sLocker UI kit. sLocker
Account and notifications
| Component | Flutter | Web | What it does |
|---|---|---|---|
SignIn |
SrSignIn |
<sr-sign-in> |
Sign-in with the methods the app and the service provider allow. |
NotificationInbox |
SrNotificationInbox |
<sr-notification-inbox> |
Notifications, with unread ones marked and Mark all as read. |
WalletSummary |
SrWalletSummary |
<sr-wallet-summary> |
Balance, credit available, top up and transactions. |
NotificationPreferences |
SrNotificationPreferences |
<sr-notification-preferences> |
A switch per channel and per notification category. |
AccountPrivacy |
SrAccountPrivacy |
<sr-account-privacy> |
Name and email, sign-ins with Sign out, privacy policy and terms, and Close my account. |
Orders and tracking
| Component | Flutter | Web | What it does |
|---|---|---|---|
OrderList |
SrOrderList |
<sr-order-list> |
The person's orders. |
OrderDetail |
SrOrderDetail |
<sr-order-detail> |
One order: reference, status, total and tracking. |
Tracking |
SrTracking |
<sr-tracking> |
Track a parcel by its tracking number or code. |
Returns and shipping
| Component | Flutter | Web | What it does |
|---|---|---|---|
ReturnList |
SrReturnList |
<sr-return-list> |
The person's returns. |
ReturnForm |
SrReturnForm |
<sr-return-form> |
Start a return. |
ShippingOrderForm |
SrShippingOrderForm |
<sr-shipping-order-form> |
Create a shipping order. |
Without signing in
| Component | Flutter | Web | What it does |
|---|---|---|---|
GuestQuote |
SrGuestQuote |
<sr-guest-quote> |
A price for one of the service provider's quote lines: origin, destination postcode and country, units and packages; shows the price before tax, the tax, the total and how long the price is valid. |
GuestShippingOrder |
SrGuestShippingOrder |
<sr-guest-shipping-order> |
A shipment without an account: sender, recipient, packages and a choice of prices, a code sent to the person's email or phone, then the payment page opened by the app; afterwards the status, tracking numbers, cancelling, the label as a file and the person's own shipments. |
Store and mall
| Component | Flutter | Web | What it does |
|---|---|---|---|
StoreDirectory |
SrStoreDirectory |
<sr-store-directory> |
The stores of the service provider's mall. |
StorePage |
SrStorePage |
<sr-store-page> |
One store and its items. |
ProductDetail |
SrProductDetail |
<sr-product-detail> |
One item with its options. |
Cart |
SrCart |
<sr-cart> |
The cart of one store. |
Checkout |
SrCheckout |
<sr-checkout> |
Delivery, payment and placing the order. |
Group buy
| Component | Flutter | Web | What it does |
|---|---|---|---|
GroupBuyList |
SrGroupBuyList |
<sr-group-buy-list> |
Open group buys. |
GroupBuy |
SrGroupBuy |
<sr-group-buy> |
One group buy and joining it. |
GroupBuyOrders |
SrGroupBuyOrders |
<sr-group-buy-orders> |
The person's group buy orders. |
GroupBuyOrder |
SrGroupBuyOrder |
<sr-group-buy-order> |
One group buy order. |
Group buy leaders
| Component | Flutter | Web | What it does |
|---|---|---|---|
GroupBuyLead |
SrGroupBuyLead |
<sr-group-buy-lead> |
Apply to lead a group buy and see the commission. |
GroupBuyLeading |
SrGroupBuyLeading |
<sr-group-buy-leading> |
The groups the person leads. |
GroupBuyLeadingGroup |
SrGroupBuyLeadingGroup |
<sr-group-buy-leading-group> |
One group the person leads, with its members and orders. |
Driver apps
| Component | Flutter | Web | What it does |
|---|---|---|---|
DriverRoutes |
SrDriverRoutes |
<sr-driver-routes> |
The driver's routes. |
RouteStops |
SrRouteStops |
<sr-route-stops> |
The stops of a route. |
Stop |
SrStop |
<sr-stop> |
One stop: photos, a signature, the delivery PIN and the outcome. |
DriverDuty |
SrDriverDuty |
<sr-driver-duty> |
The On duty switch and order offers to accept or reject. |
DriverPool |
SrDriverPool |
<sr-driver-pool> |
Orders the driver may take from the pool. |
RouteBoards |
SrRouteBoards |
<sr-route-boards> |
Route boards with their open seats. |
RouteBoard |
SrRouteBoard |
<sr-route-board> |
One route board: take a seat or bid on it. |
BoardClaims |
SrBoardClaims |
<sr-board-claims> |
The driver's claims on route boards, with Withdraw. |
DriverEarnings |
SrDriverEarnings |
<sr-driver-earnings> |
Delivered orders, tips and estimated pay by period. |
ScanLookup |
SrScanLookup |
<sr-scan-lookup> |
Find an order by reference, order ID or tracking number, typed or scanned. |