Shopify themes, liquid, logos, and UX
Hi guys,
Website: seraneeva.com
How can I add the same animation when a user clicks in the newsletter in the footer to the search in the header? I'd like everything to be the same, but just as "Email" turns white to match the underline in the newsletter, I'd like "Search" to turn black to match the underline in the Search tab.
Solved! Go to the solution
This is an accepted solution.
Hi @flammagreg,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file footer-main.liquid
Step 3: Find "right-drawer.liquid" file and inside "search-input-group" replace to this code:
<label for="Search" class="hidden-label">Search</label>
<input
type="search" name="q" id="search-input" placeholder="{{ 'general.search.placeholder' | t }}"
class="input-group-field" aria-label="{{ 'general.search.placeholder' | t }}" autocomplete="off" autocorrect="off" spellcheck="false" ref="searchText"
v-model="searchQuery" @keydown.enter="onSearchSubmit"
/>
<button type="button" aria-label="{{ 'general.search.clear' | t }}" class="search-drawer--clear icon-fallback-text standalone-icon--wrapper" v-if="searchQuery.length > 0" v-on:click="clearSearchInput">
<span class="fallback-text">{{ 'general.search.clear' | t }}</span>
{% render 'theme-icon' with icon: 'close', iconSize: 20 %}
</button>
</div>
Step 4: Pls insert this code to your file css:
.search-input-group {
position: relative;
}
.hidden-label {
overflow: initial !important;
clip: unset !important;
}
.search-input-group:has(input:placeholder-shown) > label
{
top: 0;
left: 0;
transform: translate(30px, 10px);
margin-bottom: 0;
transition: all 1s cubic-bezier(.5,0,0,1);
color: gray !important;
}
.search-input-group input::placeholder {
color: transparent !important;
}
.search-input-group:has(input[type="search"]:focus) > label,
.search-input-group:has(input[type="search"]:not(:placeholder-shown)) > label
{
transform: translate(0, -5px) scale(.6428571429);
color: black !important;
}
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
This is an accepted solution.
Hi @flammagreg,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file footer-main.liquid
Step 3: Find "right-drawer.liquid" file and inside "search-input-group" replace to this code:
<label for="Search" class="hidden-label">Search</label>
<input
type="search" name="q" id="search-input" placeholder="{{ 'general.search.placeholder' | t }}"
class="input-group-field" aria-label="{{ 'general.search.placeholder' | t }}" autocomplete="off" autocorrect="off" spellcheck="false" ref="searchText"
v-model="searchQuery" @keydown.enter="onSearchSubmit"
/>
<button type="button" aria-label="{{ 'general.search.clear' | t }}" class="search-drawer--clear icon-fallback-text standalone-icon--wrapper" v-if="searchQuery.length > 0" v-on:click="clearSearchInput">
<span class="fallback-text">{{ 'general.search.clear' | t }}</span>
{% render 'theme-icon' with icon: 'close', iconSize: 20 %}
</button>
</div>
Step 4: Pls insert this code to your file css:
.search-input-group {
position: relative;
}
.hidden-label {
overflow: initial !important;
clip: unset !important;
}
.search-input-group:has(input:placeholder-shown) > label
{
top: 0;
left: 0;
transform: translate(30px, 10px);
margin-bottom: 0;
transition: all 1s cubic-bezier(.5,0,0,1);
color: gray !important;
}
.search-input-group input::placeholder {
color: transparent !important;
}
.search-input-group:has(input[type="search"]:focus) > label,
.search-input-group:has(input[type="search"]:not(:placeholder-shown)) > label
{
transform: translate(0, -5px) scale(.6428571429);
color: black !important;
}
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025