Vibary.ai
← Vibe Coding

Combobox Filter Narrow

Typing fades out the options that no longer match while the survivors slide up.

formsminimalfuturisticinteraction · finite · advanced · ~0.3s
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.

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

/**
 * Vibary · Combobox Filter Narrow
 *
 * Typing narrows the list instead of redrawing it: options that no
 * longer match fade where they stand, the ones that survive slide up

About this pattern

A picker that narrows instead of redrawing. Every option keeps its own element for the whole session, so a keystroke moves rows rather than tearing them out and inserting new ones: a row that stops matching fades where it stands, the ones that survive travel up into the gap on a tightly damped spring, and the panel eases to its new length. Rows are laid out by transform alone and never resize, so no label is ever stretched mid-move. Arrow keys, Enter and Escape all work, and the count of remaining options is announced.

Filter a long option listSearchable select fieldCountry or method pickerNarrow choices as you type

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

    Country selection filters in place while the panel resizes to fit.

Related patterns