Revamp Your Shopify Dawn Header: Customizing the Menu Close Icon
Hey fellow store owners! Ever stared at that little 'X' icon that closes your mobile menu on Shopify's Dawn theme and thought, 'Gee, I wish that could be my brand's icon?' You're not alone! It's a small detail, but these little touches really make your store feel unique and polished. I recently saw a fantastic discussion unfold in the Shopify Community forums about this very thing, and it was a prime example of how collective wisdom can solve tricky customization challenges. Let's dive into how you can swap out that standard 'X' for something that truly represents your brand.
The Challenge & Community's Approach
The original question came from cyberfenix, who was looking to replace the default menu close 'X' on their Dawn theme. As often happens with theme customizations, there are a couple of ways to skin this cat, and the community weighed in with some great insights. The key challenge here is that many theme icons are part of a larger system, so you can't just willy-nilly replace a file without affecting other parts of your store (like the cart drawer or popups – a great point brought up by umerzaman152!). The best solutions focus on overriding the icon rather than directly editing the core theme files.
Recommended Method: Custom CSS for a Seamless Swap
For most store owners, especially those who prefer not to dig too deep into theme code, the Custom CSS approach is your best friend. This method, beautifully outlined by Ploqo in the discussion, lets you upload your custom icon and then use a few lines of CSS to tell your theme, 'Hey, use this image here instead of the default icon.' It's clean, effective, and less prone to issues with future theme updates.
Here’s how you can do it, step-by-step:
Step 1: Upload Your Custom Icon
- From your Shopify admin, navigate to Content > Files.
- Click Upload files at the top right and select your custom icon. A square PNG works best for consistency.
- Once uploaded, click the Copy link icon next to your new file. Keep this link handy!
Step 2: Add Custom CSS to Your Theme
- Go to Online Store > Themes.
- On your Dawn theme, click Customize (the green button).
- In the left sidebar of the theme editor, click the Header section.
- Scroll down until you find the Custom CSS box. Paste the following code into it. Remember to replace
PASTE-YOUR-LINK-HEREwith the icon link you copied earlier..header__icon--menu .icon-close { background: url("PASTE-YOUR-LINK-HERE") center / contain no-repeat; } .header__icon--menu .icon-close path { display: none; } - Click Save.
And just like that, your custom icon should appear when you open your mobile menu! Pretty neat, right?
Addressing Sizing: The cyberfenix Dilemma
Now, as cyberfenix discovered, sometimes the icon might appear a little smaller or larger than you'd like. They mentioned wanting the close icon to be the same size as the 'hamburger' icon – a very common aesthetic goal! Luckily, Ploqo had a brilliant follow-up solution for this, also using Custom CSS.
If your new icon isn't quite the right size, simply head back to that same Header > Custom CSS box in your theme editor. Underneath the code you just added, paste this snippet:
details[open] > .header__icon--menu .icon-close {
transform: scale(1.4);
}
The transform: scale(1.4); property will make your icon 1.4 times larger than its original size. Ploqo even shared a visual of how this can look on a phone:
1.4 value – try 1.6 for bigger, 1.2 for smaller, until it looks just right. Don't forget to click Save after each adjustment!
The Advanced Route: Direct Code Editing
For those of you who are more comfortable with theme code and want a deeper dive, umerzaman152 offered an alternative approach involving direct edits to the header-drawer.liquid snippet. This method involves finding the specific line that renders the close icon, which might look like {{- ‘icon-close.svg’ | inline_asset_content -}} or {% render ‘icon-close’ %} depending on your Dawn version. You'd then replace that line with your own SVG code or an tag pointing to your uploaded icon.
A critical warning here: As umerzaman152 rightly pointed out, avoid editing the icon-close file itself. This icon is often a shared asset used in other places like your cart drawer or popups. Changing the source file would change the 'X' everywhere, which might not be what you intend. Stick to replacing the reference to the icon within header-drawer.liquid if you go this route, or better yet, use the Custom CSS method to avoid this risk altogether.
Customizing your Shopify store's header, even seemingly small elements like the menu close icon, is a fantastic way to reinforce your brand identity and provide a more cohesive user experience. The community discussion highlights that there's often more than one way to achieve a customization, and understanding the pros and cons of each helps you make the best decision for your store. Whether you choose the straightforward Custom CSS method or a more hands-on code edit, remember to always back up your theme before making significant changes! Happy customizing!







