
The elastic button
Buttons, Hover, Text
The search bar of Wayfern, an invented travel app, made of frosted glass over a real landscape photo, in the style of light and material on real interface pieces: touched, it widens and the photo behind blurs and darkens, as you type the suggestions rise in glass cards stacked with a slight offset, and picking one opens the photo of the place in a circle from its thumbnail.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Glass search over photo" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The glass search over a photo that blurs</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the search of a travel app, made of frosted glass over a landscape: touched it widens, the photo behind
blurs and darkens, the suggestions rise in glass cards, and the pick opens the photo of the place -->
<section class="card" data-card aria-label="Wayfern search">
<div class="photo" data-photo>
<!-- the four places: real CC0 photos stacked, the chosen one on top -->
<img class="scene" data-scene="dolomites" src="dolomites.webp" alt="" width="1024" height="683" decoding="async">
<img class="scene" data-scene="lofoten" src="lofoten.webp" alt="" width="1024" height="571" decoding="async">
<img class="scene" data-scene="atacama" src="atacama.webp" alt="" width="1024" height="683" decoding="async">
<img class="scene" data-scene="coast" src="coast.webp" alt="" width="683" height="1024" decoding="async">
<div class="photo__veil" data-veil></div>
<svg class="photo__grain" aria-hidden="true"><filter id="grain"><feTurbulence type="fractalNoise" baseFrequency=".9" numOctaves="2" stitchTiles="stitch"></feTurbulence><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0"></feColorMatrix></filter><rect width="100%" height="100%" filter="url(#grain)"></rect></svg>
</div>
<header class="top">
<p class="top__brand"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 18 10 6l4 8 2-3 4 7Z"></path></svg>Wayfern</p>
<p class="top__meta">Explore</p>
</header>
<div class="search-wrap">
<div class="search" data-search>
<span class="search__edge" data-edge aria-hidden="true"></span>
<span class="search__shine" data-shine aria-hidden="true"></span>
<svg class="search__lens" viewBox="0 0 24 24" aria-hidden="true"><circle cx="10.5" cy="10.5" r="6"></circle><path d="m15 15 4.5 4.5"></path></svg>
<input class="search__input" data-input type="text" autocomplete="off" spellcheck="false" placeholder="Search a place" aria-label="Search a place" aria-controls="sugg">
<button class="search__clear" data-clear type="button" aria-label="Clear the search"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m8 8 8 8M16 8l-8 8"></path></svg></button>
</div>
</div>
<ul class="sugg" id="sugg" data-sugg role="listbox" aria-label="Suggested places"></ul>
<div class="hero" data-hero>
<p class="hero__kicker" data-kicker>Where to next?</p>
<h1 class="hero__title" data-title aria-live="polite">Dolomites</h1>
<p class="hero__sub" data-sub>Italy · 12 stays from €96</p>
</div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
19 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Glass search over photo” from Animorio and fit it into my siteThe bar and the cards have a semi-transparent white background with backdrop-filter blur and saturate: they really blur the photo behind them. A light inner shadow at the top gives the glass its thickness.
The edge is a conic-gradient cut by a mask into a one-pixel ring; the angle the light starts from is a CSS variable following the angle between the bar’s centre and the pointer, with quickTo so it gets there softly.
On opening the photo gets a blur and brightness filter and a scale of 1.06, so the blurred edges stay outside the card; on closing it comes back sharp with the same curve.
Each card is absolutely positioned: its y comes from the index, and each next card is shifted sideways by a few pixels and is slightly smaller. When the list changes, the remaining cards slide to their new place and the new ones rise with back.out.
The new photo goes above the others with a clip-path circle starting from the centre of the chosen thumbnail and reaching the radius that covers the whole card; when done, the clip-path is removed and the other photos are hidden.
The four photos are stacked img elements with object-fit cover and an object-position each, so the subject stays inside the tall, narrow card; the suggestion thumbnail uses the same file as a background-image, already cached. Blur, scale and clip-path work on the container and on the img elements just as they did on the drawings.
| Name | File | Default | What it changes |
|---|---|---|---|
BLUR | script.js | 9 | How much the photo behind the open search blurs, in pixels. |
DIM | script.js | 0.72 | How bright the photo behind the open search stays (1 = not darker at all). |
STAGGER | script.js | 6 | The sideways offset between one suggestion card and the next, in pixels. |
REVEAL | script.js | 1.1 | The seconds the photo of the chosen place takes to open from the suggestion. |
TYPE_SPEED | script.js | 0.12 | The seconds between letters when the autopilot types. |
PAUSE | script.js | 1.6 | The seconds the autopilot stays on a chosen place. |
For the search of a travel, booking or experiences app, over a large photo: wherever search is the first thing people do and the image should stay the star.
The card takes the full width minus the margins and at most the window height; below 380 pixels the bar and the cards widen towards the edges, and when the window is short the bar and the cards get lower and the line above the name disappears. A tap opens the search and picks like a click.
No springs, slides or circles: the bar widens without bounce, the cards fade in one after another without offset, the new photo fades in and the name changes without rising; the drawn pointer is hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.7 KB; the libraries: GSAP 28 KB.
Tested on 7 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.