Lens Search
Markup where the component goes, CSS in your stylesheet. No JavaScript.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/input-lensAbout this component
Search that starts as a magnifying glass. Focusing it stretches the glass's ring sideways into the field itself while the handle tucks away and a small lens settles inside; empty it and click away and it shrinks back into the glass. Pure CSS.
Triggers
- Focus
- Morph
- Icon
Techniques
- CSS transition
- Pseudo elements
- border-radius
Difficulty
Beginner
Accessibility
Keyboard and screen readers
A real search input inside role="search", labelled "Search components"; it expands on focus, so keyboard users see it open as they tab in.
Reduced motion
It opens and closes instantly.
Use it in anything you build, commercial and client work included. Licence