248

Tag Input

Typed text becomes a popping tag on Enter; × or Backspace shrinks it away

Form & controlEnterExitUI interactionApp UICSSJS + CSS

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A tag input: after typing, pressing Enter (or a comma) turns the text into a pill tag that springs in from 0 just before the input caret; each tag has an × on the right, and clicking it or pressing Backspace in an empty input shrinks and fades the last tag while the content after it closes the gap smoothly; the whole field's border lights up on focus. (JS: keydown handles Enter / comma / Backspace, inserting new elements before the input; CSS keyframes: enter scale 0→1 with cubic-bezier(.3,1.6,.5,1), exit scale→0 collapsing with a negative margin-right, remove the element on animationend)

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More form & control effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →