A Shopify store owner using the Dawn theme wants to modify their search bar display to be device-responsive. Currently, a large search bar appears on all devices.
Desired outcome:
Mobile: Replace the full search bar with a magnifying glass/lens icon
Desktop: Keep the existing large search bar unchanged
The user provided reference images showing:
Current state: Full-width search bar on mobile
Target design: Compact lens icon implementation
Status: The question remains unanswered. The user is seeking guidance on code modifications or theme settings to achieve this mobile-specific customization while preserving the desktop experience.
Summarized with AI on October 27.
AI used: claude-sonnet-4-5-20250929.
I’m using the Dawn theme for my Shopify store. Currently, my search bar is large and visible on all devices. I’d like to change it to a lens (magnifying glass) icon on mobile while keeping the big search bar on desktop.
I’ve attached an image showing the position and style I’m aiming for. Could anyone please guide me on how to adjust the code or settings to achieve this?
hey @Sivadarshan so you want change the search bar in to search icon so for that thing so their is some setting your store theme cuztomization so follow these steps
first open your shopify store and then go to the online store and then go to the cuztomization and the find the header option in your cuztomization and the open the header block and the your can see some setting your right hand side
and then find some setting in your search bar and then you can change your search bar in to the search icon
if the problem was solved
then don’t forget to like and mark as solution
In the code editor, find the header.liquid file under the “Sections” folder and open it.
Use Ctrl + F to search for
.
Inside this div, you’ll see the code for the cart icon. Paste the following code snippet right before or after the cart icon code, depending on where you want the search icon to appear: