Shopify themes, liquid, logos, and UX
Hey, anybody who could help me, currently I am trying to create a search icon, that when clicked on expands into a search bar, in the simple theme. I currently have the following elements, in my header.liquid,I only need to tie them together with the javascript code, but I have no idea where to start:
<div class="top-bar__search">
<a class="medium-up--hide">
{% include 'icon-search' %}
</a>
{% comment %}Search Button Click{% endcomment %}
<div class="search-bar small--hide">
{% comment %}<input type="hidden" name="type" value="product">{% endcomment %}
{% comment %}Search Bar{% endcomment %}
<input type="search" name="q" class="search-bar__input" value="{{ search.terms | escape }}" placeholder="{{ 'general.search.placeholder' | t }}" aria-label="{{ 'general.search.placeholder' | t }}">
{% comment %}Search Icon{% endcomment %}
<button type="submit" class="search-bar__submit">
{% include 'icon-search' %}
<span class="icon__fallback-text">{{ 'general.search.submit' | t }}</span>
</button>
</div>
</div>
</div>
User | RANK |
---|---|
163 | |
142 | |
74 | |
66 | |
56 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023