Arc
ComponentsBlocksScreensDocsPricingTry the demo
Get Pro
Saved

Docs

IntroductionInstallationThemingMotionAI and MCPChangelog

Components136

ButtonAction buttonSplit buttonButton groupFloating button groupExpanding button groupCopy buttonAction swapIcon morphConfirm morphTheme switcher

Hold to confirmSwipe actionsReactions

Dropdown menuContext menuUser menu

InputTextareaPassword fieldPassword strengthSearch fieldExpanding searchInline edit

Number fieldMoney inputPhone inputScrub inputTag inputMention inputShortcut recorder

SelectComboboxMulti-selectMorph selectChip group

Radio cardsBilling toggleCheckboxRadio groupSwitchSegmented controlRatingToggle group

SliderElastic sliderRange histogram sliderRuler sliderWindow rangeNewProLens rangeNewPro

CalendarDate pickerDate range pickerTime pickerColor pickerEmoji pickerPro

Rich text editorSignature padFile dropzoneAvatar uploadPro

TabsBreadcrumbPaginationMega menu morphProTable of contents progressPro

Scroll areaAccordionExpandable cardResizable panelsExpandable text

DialogDrawerBottom sheetPopoverHover cardTooltipShare accessProConfirm popoverPro

AlertToastToast stackAnnouncement barCookie consentUndo toastPro

ProgressSkeletonStepperCountdownUsage meterOnboarding checklist

AvatarAvatar groupBadgePresence stackPro

CardMetric cardEmpty stateMetric tickerPro

Line chartBar chartDonut chartStreamgraphBrush chartWaffle chartSlope chartSparklineGaugeActivity heatmapAnimated counterRidgelineTreemapSplit barPro

SunburstProSankey flowProFunnel chartProRadar chartProRealtime streamProRace bar chartProData gridPro

Sortable data tableTree tableTree viewReorderable listFilter toolbarCode blockJSON viewer

TimelineComment threadChat thread

Image compareCarouselCard stack

Text revealIn-view titleText morphText shimmer

Blocks122

KPI drilldownProMetric explorerProRevenue explorerProMRR waterfallProCohort retentionProUsage forecastProJourney flowProUptime statusProPivot builderProChoropleth explorerProConnected scatterProHorizon chartProAccount healthPro

Budget variancePro

Small multiplesProLine replayPro

AI chatProAI composerProAI answerProModel pickerProModel arenaProPrompt studioProDocument extractionProAgent memoryProAI side panelProAI inline editProResearch runProAI insight cardProCatch upProAI feature launchProAI search barProAI setup wizardProCall insightsProLead scoringPro

Agent runProAgent tasksProAgent approvalsProAgent routinesProAgent orchestratorProMCP serversProKnowledge baseProEval suiteProAgent builderProAgent galleryPro

SidebarPro4Page headerCommand paletteNotification centerSelection toolbarProEmpty statesSearch resultsPro

Login and sign up5, free and Pro variantsOnboarding illustrationProOTP inputMulti-step formProTwo-factor setupProMagic linkPro

Settings pageProSettings commandProSecurity settingsProBilling overviewProUsage billingProCancel flowProOnboarding surveyProSpend alertPro

Team membersProInvite peopleProRoles and permissionsProProfile pagePro

API keysProWebhooksProIntegrationsProImport wizardNewProEnvironment variablesProDomain verifyProWebhook testerPro

Plan comparisonPricing calculatorProUsage pricingProCart drawerProCheckout summaryProLive checkoutProSeat managerProCredit top-upPro

Wallet cardProDelivery trackerProSeat mapPro

Activity feedProSupport widgetProFeature votingPro

File uploadMedia playerPro

Availability pickerProRelease readinessProFeedback boardProSmart schedulerProTask breakdownProGoal trackerPro

Hero sectionHero signupPro

Scroll storyProSpotlight gridProFeature bentoProComparison table

Logo marqueeStudio perspectivesProStats band

Changelog feedFAQ sectionContact sectionTeam showcaseProBlog grid

Site headerSite footerCTA sectionNewsletter signup

Activity terrainProRevenue globeProCustomer galaxyProSemantic zoomProLayout morphProExploded viewPro

Screens14

Metrics dashboardProMarket terminalPro

Kanban boardProProject boardProGantt timelinePro

Week calendarProMonth calendarNewPro

Team directoryPro

Inbox triageProSupport conversationProHelp centerPro

Product listingProProduct detailProInvoice studioPro

Special components106

Share sheetProAction morphProMorph navProDockProLiquid tab barProOrbit menuPro

Glass menuProGlass segmentedProGlass cardProGlass tab barPro

Sheet stackProWallet stackProControl centerProHolo cardProCard to articleProLink unfurlPro

Product galleryProLightbox galleryProPhoto gridProCover flowPro

Voice orbProNow playingProVoice recorderPro

Booking pillProActivity ringsProTime dialProDate reelPro

Keycap keyboardProSlot textSand textProTypewriter terminalPro

Stretch refreshProMorph loaderProSkeleton morphProBlack holeProCharge sessionPro

Sticker peelProTicket tearProPage curlProOrbit logosProPrize wheelPro

Dot gridProImage trailProGravity wellProInk fluidProCursor trail drawPro

Agent statusProTool callProAgent planProAgent timelineProContext windowProReasoning blockProSource cardsProModel cardProAI workflowProCode suggestionProGhost textProImage generationProDictation buttonProSpeech playerProMeeting summaryProReply draftProAgent handoffProPII redactionProResponse feedbackProLLM cost calculatorProProvider keysProGeneration statsProAI translateProTL;DR toggleProConnector setupProSmart form fillProEnrich columnProTicket routerProAsk your dataProAgent cursorProProvider statusProTraining runProAI commandProStarter promptsProAI mascotProImage revealProAI sparkProPixel mascotProGhost mascotProCube mascotProTone tunerProUpgrade promptProReferral cardProTrial bannerProTeam switcherProLive visitorsProSocial proof toastProInstall snippetPro

Data flowProPayment flowProDNS resolutionProModel trainingProMulti-region failoverProVector searchProBranch graphProAgent loopProMixture of expertsProSpeculative decodingProPrompt cacheProReasoning treePro
What’s new4 new
BlocksCart drawer

Cart drawer

Pro

Products fly into the cart, counts roll, and a drawer handles quantities, shipping progress, and checkout.

Live block · sample data

When to use

  • Product listings where people add several items and review them in a side cart.
  • Stores that show a free shipping threshold and promo codes before checkout.
  • Demos of an add to cart interaction with clear feedback on where the item went.

When not to use

  • Use checkout-flow for a full multi-step checkout with address and payment.
  • Use checkout-summary when you only need the order summary and totals.
  • Use drawer for a generic side panel that is not a cart.

Installation

Pro source and install commands unlock with a Pro plan.

Usage

Use this as a starting point and replace the sample data with your own.

example.tsx
1import { CartDrawer } from "@/components/arc/blocks/cart-drawer/cart-drawer";2 3export function ShopPage() {4  return <CartDrawer />;5}
Built fromMotion

API reference

CartDrawer

A product grid with a slide-in cart. Adding an item arcs its photo into the cart button, lines can be swiped away, a free shipping bar fills, promo codes validate, and the checkout button folds into a confirmation disc. Products, prices, and the order are sample data; checkout is simulated. Also the default export.

No props.

Keyboard interactions

EnterorSpace
Adds a product, opens the cart, and runs the quantity, remove, and checkout buttons.
Escape
Closes the drawer, except while an order is being placed. Focus returns to the cart button.
Enter (promo field)
Applies the promo code.

Accessibility

  • The cart button has aria-haspopup="dialog", aria-expanded, and a label with the item count. The drawer is role="dialog" with aria-modal and moves focus to its close button.
  • The shop behind an open drawer is inert, and the drawer body is inert while an order is placing.
  • Quantity steppers are labelled groups; the minus button becomes "Remove" at quantity one. Swipe to remove has button equivalents.
  • The shipping bar is a role="progressbar"; an invalid promo sets aria-invalid and swaps the note under the field.
  • Adds, removals, promo changes, and the placed order are announced in a polite live region.

Motion

  • The product photo flies along a quadratic arc into the cart over 780ms, shrinking and tilting; the badge count only changes when it lands, then the cart bumps and rings.
  • The drawer slides in on a critically damped spring. Rows collapse in height when removed and the totals roll with AnimatedCounter.
  • Swipe a row left past 110px, or flick it, to remove; short drags snap back with the release velocity.
  • The checkout button shares a layoutId with the confirmation disc, then a checkmark draws in.
  • Reduced motion skips the flight and the bump, disables row dragging, fades the drawer instead of sliding it, and zeroes the remaining springs.

Responsive behavior

  • The root is a size container. Above 640px the grid has three columns; at 640px and below it has two, with tighter padding.
  • At 380px and below the cart label hides, prices stack under names, and the drawer fills the block with a 4px inset.
  • Rows accept horizontal drag with direction lock, so vertical scrolling in the drawer still works on touch.

Performance

  • Each flight is driven by one motion value and transforms, not React state per frame; several flights can overlap.
  • The drawer and scrim only mount while open; timers are cleared on unmount.
  • Product images use next/image with sizes for 50vw on small screens and 260px otherwise.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Use for an ecommerce page where adding to cart and reviewing the cart happen without leaving the grid.
  • Replace PRODUCTS (with PhotoId images from @/components/arc/lib/media) and the FREE_SHIPPING, SHIPPING, and PROMO constants; swap the image source for your own URLs if needed.
  • There are no props. Connect the add, setQty, remove, applyPromo, and checkout functions to your cart store and payment flow; checkout currently waits 1.3s and shows a sample receipt.
  • Composes Arc Button and AnimatedCounter.
/components/blocks/cart-drawer/markdown

The full library index for assistants is at /llms.txt.

Related

Checkout summaryProBlockAn order summary with a promo code that becomes a chip, discount and tax lines, and pay button states.DrawerComponentA temporary side surface for focused work.Swipe actionsComponentReveal row actions with a swipe, or from the same actions in a menu.Number fieldComponentEnter a bounded number with clear increment controls.
PreviousInvite peopleNextPricing calculator
Arc · 122 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown

New in the studio

  • A woven oak lounge chair with a sheepskin and linen cushion on a concrete floor

    Oak lounge chair

    $1,240

    Woven oak, sheepskin

  • A white mushroom table lamp glowing beside books and a small vase

    Dome table lamp

    $186

    Opal glass, 2700K

  • A hand pouring water from a ribbed glass carafe into tumblers

    Ribbed carafe

    $64

    Mouth-blown glass, 1 L

  • Two speckled stoneware cups with a lid on a pale table

    Stoneware cups

    $48

    Set of two, speckled

  • Two stacked speckled ceramic bowls against a dark wall

    Nesting bowls

    $56

    Glazed stoneware, pair

  • Folded natural linen throws with fringed edges in soft window light

    Linen throw

    $118

    Stonewashed, fringed