Skip to content
Twentyfirst UIHalo

Order Summary

Commerce · Button, CartLine, CheckoutSteps, OrderSummary

Cart and checkout pieces: CartLine rows, the OrderSummary with discount code and free-shipping progress, and CheckoutSteps.

CartLine props: name, variant, note, art + tint, price, qty, onQty(n), onRemove (the − button becomes a bin at 1).
OrderSummary props: lines ({name, variant, art, tint, price, qty}), showLines, discount ({code, pct | amount, label}), onCoupon(code) (return false to show "isn’t valid"; null removes), shipping (fixed) or freeShippingFrom (default 75, else €4.90), vat (19, prices include it), title, action (the CTA).
CheckoutSteps props: steps (Cart, Details, Shipping, Payment), current, onPick (go back only).

  • Keep the summary in a sticky side column on desktop; it moves under the form on phones.
  • Show what's left for free shipping; it is the strongest nudge in a cart.
  • Removing a line shows an Undo toast instead of a confirm.
Halo Cotton TeeM · Sky
1
€32
Studio MugOnly 6 left
2
€36
Order summary
1Halo Cotton TeeM · Sky€32
2Studio Mug€36
Add €7 for free shipping
Subtotal
€68
Shipping
€4.90
Total
€72.90
incl. 19% VAT
€11.64

Props

Button

PropTypeNotes
variant?"primary" | "secondary" | "soft" | "ghost" | "danger" | "danger-solid"
size?"md" | "sm"
icon?IconName
iconRight?IconName
disabled?boolean
type?"button" | "submit"
onClick?(e: MouseEvent<HTMLButtonElement>) => void
children?ReactNode
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

CartLine

PropTypeNotes
namestringRequired
variant?string
note?string
artArtKindRequired
tint?Tint
pricenumberRequired
qtynumberRequired
onQty?(n: number) => void
onRemove?() => void
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

CheckoutSteps

PropTypeNotes
steps?string[]
current?number
onPick?(i: number) => void
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

OrderSummary

PropTypeNotes
lines{ name: string; variant?: string; art: ArtKind; tint?: Tint; price: number; qty: number; }[]Required
showLines?boolean
discount?Discount | null
onCoupon?(code: string | null) => boolean | void
shipping?number | null
freeShippingFrom?number
vat?number
title?string | false
action?ReactNode
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.