figma guide

Designing mini cart and cart drawer UI in Figma: slide-over patterns, line items, and handoff

Design mini cart and cart drawer UI in Figma with slide-over panels, line items, quantity controls, subtotals, and Dev Mode specs that pair with checkout and shipping bars.

Published
Updated
Jul 02, 2026
Read time
7 min
Level
Beginner

Quick answer

A mini cart (cart drawer) is a slide-over panel that shows current line items, quantity controls, subtotal, and checkout CTAs without leaving the page. Trigger it from the header cart icon with a badge count. Stack line items (thumbnail, title, variant, price, qty stepper, remove), optional free shipping progress, subtotal + savings, and primary checkout + secondary “View cart” buttons. Design empty, loading, error, and max-quantity states. On mobile, use full-height or bottom sheet patterns with safe-area padding. Start from the Figma guides hub and templates pillar.


Who this is for

  • Product designers improving add-to-cart flow on PLP, PDP, and marketing pages.
  • Design system teams standardizing cart drawer behavior across desktop and mobile.
  • Engineers implementing slide-over focus traps, cart sync, and analytics on open/close.

Mini cart vs full cart page

SurfaceWhen to usePrimary action
Cart drawerQuick review after add-to-cartCheckout or continue shopping
Full cart pageEdit large carts, apply coupons, compare totalsCheckout
CheckoutPayment and shippingPlace order
Sticky bar onlyMobile PDP scroll contextAdd to cart (opens drawer)

Verdict: the drawer is for speed and confirmation; route power users to the full cart page for coupon entry and detailed edits.


CartDrawer anatomy

PartSpecNotes
Header”Cart (3)” + close buttonTitle includes live count
Line item listScrollable stackMax height ~60vh desktop
Shipping meterOptional ShippingProgressBarTop of list or above subtotal
Promo rowLink to full cart for couponsAvoid cramped coupon field in v1
Subtotal blockSubtotal, savings, estimated tax note”Tax calculated at checkout”
CTA stackPrimary checkout + secondary view cartFull-width buttons
Footer trustSecure checkout iconsOne row max
BackdropDimmed overlayClick closes drawer
CartDrawer
├── Variant: state=empty | loading | populated | error
├── Variant: platform=desktop | mobileSheet
├── Property: itemCount=3
├── Property: subtotal=142.50
└── Layers:
    ├── Backdrop
    ├── Panel
    │   ├── Header (Title + Close)
    │   ├── LineItemList
    │   │   └── CartLineItem (repeat)
    │   ├── ShippingProgressBar (optional)
    │   ├── SummaryBlock
    │   ├── CheckoutButton
    │   └── ViewCartLink
    └── FocusTrap (annotation)

Use Auto Layout for the panel with fixed header/footer and scrollable middle. Apply effects tokens for elevation—drawer should sit above modals only when intentionally layered.


CartLineItem component

ElementSpecNotes
Thumbnail64–80px square, radius smLink to PDP
Title2-line clampProduct name
Variant lineSize / color / subscriptionLink to variant selectors
PriceUnit or line totalShow strike if on sale
Qty stepper− / count / +Min 1; max from inventory
RemoveIcon or text linkConfirm if qty > 5 (optional)
BadgeSubscription, gift, preorderUse chips
CartLineItem
├── Variant: layout=standard | compact
├── Variant: type=standard | subscription | bundle
├── Property: quantity=2
├── Property: maxQuantity=10
└── Layers:
    ├── ThumbnailLink
    ├── DetailsColumn
    │   ├── Title
    │   ├── VariantMeta
    │   └── PriceRow
    └── ActionsColumn
        ├── QuantityStepper
        └── RemoveAction

Prototype qty change with interactive components and disabled + state at max inventory.


Header cart trigger

ElementSpecNotes
IconBag or cart outline24px touch target min 44px
BadgeCount bubbleHide at 0; cap display “9+“
Open behaviorClick opens drawerDo not navigate away
Add feedbackBrief badge pulse or toast”Added to cart” optional

Keep badge count in sync with drawer list—stale counts erode trust faster than a slow animation.


Layout comparison

PatternBest forTrade-off
Right slide-over (desktop)Most storefrontsCovers content; needs focus trap
Full-height mobile sheetThumb reach, long cartsMore screen takeover
Bottom sheet (mobile)Quick peek at 1–2 itemsLess room for upsells
Center modal cartLegacy themesWorse for long line lists
Inline dropdown cartHeader-heavy sitesBreaks on mobile

On mobile frames, anchor CTAs above the home indicator with 16px+ bottom padding.


State matrix

StateTriggerUI
EmptyitemCount === 0Illustration + “Your cart is empty” + shop CTA
LoadingCart hydratingSkeleton lines
PopulatedItems presentFull layout
Updating qtyAPI in flightStepper disabled + subtle spinner
Max qtyAt inventory capDisabled +; tooltip
ErrorSync failedInline alert + retry
Subscription mixed cartRecurring + one-timeLabel lines per subscription UI

Design empty cart with link to category landing or bestsellers—not a dead end.


Interaction with adjacent modules

ModuleRelationship
Free shipping barRecalculate on qty change inside drawer
Sticky add-to-cartAdd opens or refreshes drawer
CouponsLink “Have a code?” → full cart
RecommendationsOptional rail below line items
CheckoutPrimary CTA preserves cart state
Wishlist”Move to wishlist” on line item menu

Avoid stuffing compare, gift message, and coupon field into v1 drawer—each adds scroll and error surface.


Motion and accessibility

ConcernSpec
Enter animationSlide from right 250–300ms ease-out
ExitReverse or fade backdrop
Reduced motionInstant open/close; no slide
FocusTrap focus inside panel; return on close
CloseEsc, backdrop click, close button
Scroll lockBody scroll disabled while open
Screen readerrole="dialog", aria-modal="true", label “Shopping cart”

Document focus order: close → first line item → checkout → view cart.


Handoff checklist

ItemDev Mode annotation
Open triggerHeader icon + programmatic open after ATC
Data sourceCart API / local optimistic state
Qty debounce300–500ms before PATCH
Remove behaviorAnimate out; update badge
Subtotal rulesPre-tax; document discount order
Checkout URLPreserve session + UTM
Analyticscart_drawer_open, cart_drawer_checkout_click, line_item_qty_change
BreakpointsDrawer width 400–480px desktop; full width mobile
z-indexAbove header; below global modals if stacked

Use Dev Mode checklist and responsive constraints.


Common mistakes

MistakeWhy it hurtsFix
Navigating to cart page on icon clickBreaks browse flowOpen drawer instead
No empty stateDead end after last removeShop CTA + categories
Coupon field crammed in drawerValidation errors off-screenLink to full cart
Stale badge countTrust issueSync on every mutation
Drawer taller than viewport, no scrollHidden checkoutFixed footer CTA
Opening drawer on every page loadAnnoyingOnly after explicit add
Missing focus trapKeyboard users escape to backgroundImplement dialog pattern
Showing full tax in drawerWrong when address unknown”Calculated at checkout”

  1. Audit cart flows on PLP, PDP, and header—list every add-to-cart entry point.
  2. Build CartLineItem with standard, subscription, and compact variants.
  3. Compose CartDrawer with empty, loading, populated states.
  4. Add header trigger with badge and open prototype.
  5. Integrate shipping progress if threshold promos exist.
  6. Spec motion, focus, and analytics in Dev Mode.
  7. Mobile pass at 375px with bottom CTA and safe areas.
  8. Align checkout handoff with full cart page for coupon and gift flows.

FAQ

Should add-to-cart auto-open the drawer?

Yes for confirmation-first stores; no for high-frequency B2B where designers add many SKUs. Default to open on PDP; optional setting on PLP quick-add.

Show upsell recommendations in the drawer?

Only if one horizontal rail fits without pushing checkout below fold on mobile. Otherwise place recommendations on full cart page.

Guest vs logged-in drawer?

Same layout. Logged-in users may see saved cart merge toast if session sync occurs—design a one-line alert.

Drawer vs quick view?

Quick view edits selection; drawer confirms cart contents. After quick-view add, open drawer or toast—pick one pattern sitewide.


Next steps

Share on X

§ Keep reading

Related guides.