Introduction
Adding a scrolling marquee effect to your Shopify store can enhance the visual appeal and catch the attention of your customers. Whether you want to make announcements, highlight promotions, or simply add some movement to your site, the marquee effect is a versatile tool. In this guide, we will explore how to add and customize the marquee text in Shopify, specifically for the Dawn theme. You'll also learn how to adjust the speed, color, and style of your marquee text, and how to troubleshoot common issues.
What is a Marquee Text Effect in Shopify?
A marquee text effect is a scrolling text that moves horizontally across the screen. It can be used to display important information such as sales, new arrivals, or special announcements. This dynamic text effect adds a professional and engaging touch to your store, making it more interactive and visually appealing.
Why Use a Scrolling Marquee on Your Shopify Store?
- Enhanced Visibility: A scrolling marquee draws the eye to important information, ensuring that visitors don’t miss key announcements.
- Engagement: Movement naturally attracts attention, making marquee text a great tool for engagement.
- Customization: You can easily change the text, speed, direction, and style of the marquee to fit your brand's theme.
- Mobile-Friendly: Shopify marquee effects are responsive, working well on both desktop and mobile devices.
How to Add Marquee Text to Shopify Dawn Theme
Step-by-Step Guide
-
Go to Your Shopify Admin Dashboard
Navigate to your Shopify admin dashboard and select Online Store > Themes. -
Edit Your Code
Click on the "Actions" dropdown next to your theme and select Edit Code. -
Create a New Section to Add Marquee
In the left sidebar, click on the Sections folder and then click Add a new section and Name it "marquee-txt.liquid". -
Insert the Marquee Code
Insert the following code where you want the scrolling text to appear:Code Snippet<style> .section-{{ section.id }}.custom-marquee { display: flex; align-items: center; height: {{section.settings.marquee_height}}px; width: 100vw; max-width: 100%; overflow-x: hidden; background:{{section.settings.colorBackground}}; color:{{section.settings.colorText}}; } .section-{{ section.id }}.custom-marquee a { color:{{section.settings.colorText}}; text-decoration: none; } .section-{{ section.id }}.custom-marquee .track { display: flex; align-items: center; white-space: nowrap; will-change: transform; animation: marquee 12s linear infinite; } .section-{{ section.id }}.custom-marquee .content { margin-left: 40px; font-size: {{section.settings.font_size}}px; } @keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-20%); } } </style> <div class="section-{{ section.id }} custom-marquee " role="region" {{ block.shopify_attributes }}> {%- if section.settings.link != blank -%} <a href="{{ section.settings.link }}" class=""> {%- endif -%} <div class="track "> {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- for block in section.blocks -%} <span class="content marquee-text">{{ block.settings.new_text | escape }}</span> {%- endfor -%} {%- if section.settings.link != blank -%} {% render 'icon-arrow' %} {%- endif -%} </div> {%- if section.settings.link != blank -%} </a> {%- endif -%} </div> {% schema %} { "name": "Marquee Text", "settings": [ { "type": "color", "id": "colorBackground", "label": "Background color", "default": "#000" }, { "type": "color", "id": "colorText", "label": "Text color", "default": "#fff" }, { "type": "url", "id": "link", "label": "Link" }, { "type": "range", "id": "marquee_height", "min": 24, "max": 200, "step": 2, "default": 46, "label": "Marquee height" }, { "type": "range", "id": "font_size", "min": 8, "max": 100, "step": 2, "default": 24, "label": "Font size" } ], "blocks": [ { "type": "text", "name": "Text", "limit": 20, "settings": [ { "type": "text", "id": "new_text", "default": "Welcome to store", "label": "Text" } ] } ], "presets": [ { "name": "Marquee-Txt", "blocks": [ { "type": "text" }, { "type": "text" }, { "type": "text" } ] } ] } {% endschema %}
- Save Your Changes
Looking for something specific? Drop me a message.