Vibary.ai
← Vibe Coding

Mention Autocomplete

Typing @ raises a people list that narrows with every keystroke.

socialminimalfriendlyinteraction · 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.

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

/**
 * Vibary · Mention Autocomplete
 *
 * Typing @ raises a people list that narrows with every keystroke.
 * The list is being read while it changes, so rows that stop matching

About this pattern

The list is being read while it changes, which makes removal the delicate part: rows that no longer match are popped out of flow and the survivors slide up into the gap rather than the whole list re-rendering in place. The highlight is a single shared element that travels between rows, so arrowing down reads as one object moving instead of two rectangles blinking. Text keeps a constant size throughout — the panel resizes around it, never with it.

Mentioning a person in a commentTagging a teammate in a noteAssigning from a text fieldInline channel or user lookup

Where it shows up

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

  • 10:15
    Dana Whitfieldonline
    Morning — did the venue confirm?
    They did, contract came back signed.10:14
    Are we still on for Thursday?
    Yes — booked the room for 2pm.10:14
    Perfect. I'll bring the printouts.
    See you then.10:14
    Message
    Chat thread

    A people list above the composer that filters down as the name is typed.

Related patterns