Vibary.ai
← Vibe Coding

Shipping Option Select

One plate travels to the chosen speed while the arrival estimate restates itself and the total follows.

commerceminimalcalminteraction · finite · intermediate · ~0.4s
Interactive · click to play
Variant

The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.

363 lines · react + motion only
import { useId, useState } from "react";
import type { KeyboardEvent as ReactKeyboardEvent } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Shipping Option Select
 *
 * One plate travels to the speed you picked while the arrival date

About this pattern

Choosing a delivery speed changes three things, and they have to agree. A single marker plate travels to the picked row on a shared layout animation rather than one plate fading out while another fades in, so the eye never loses the selection. The arrival sentence restates itself inside a fixed cell, which means a longer estimate cannot push the total around. The total rolls in the direction the money went — up for a faster speed, down for a slower one — at a constant type size. Arrow keys move the selection, and the plate travels for keyboard users too.

Delivery speed at checkoutPickup or courier choiceService tier selectionAny priced radio group

Where it shows up

Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.

  • Payment
    Card number4242 4242 4242 4242Name on cardN. Bergström
    Expiry04 / 28CVC•••
    Subtotal$156.00Shipping$0.00Tax$13.65Total$169.65
    Pay $169.65
    Checkout

    Changing the delivery speed restates the promised date above the order summary.

Related patterns