Vibary.ai
← Vibe Coding

Address Autocomplete

Choosing a suggestion closes the list from the bottom up and fills the fields in reading order.

commerceminimalfriendlyinteraction · finite · intermediate · ~0.7s
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.

401 lines · react + motion only
import { useState } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Address Autocomplete
 *
 * Choosing a suggestion closes the list from the bottom up and fills the
 * fields in reading order, each one flashing a ring as its value lands.

About this pattern

The step that decides whether a checkout feels short. Sequence does the work: five fields populating at once looks like a glitch, five populating in reading order looks like the form typing for you. The list empties from the bottom so the chosen row is the last one on screen, each value crossfades inside an absolutely positioned slot so the row never holds two at once, and a ring flashes over the field as its value lands. Values slide a few pixels and fade but never scale — an address that grows into place is an address that is hard to proofread.

Checkout address entryShipping details formBilling address lookupStore locator field

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

    Address lookup collapses its suggestion list and populates the remaining fields immediately.

Related patterns