How to Add a Size Chart Popup to Shopify Product Pages (2026)
Three methods, ranked by ease and scale: app-based (5 min, paid), theme code (15 min, free), or product-description HTML (5 min, doesn't scale). Here's how to do all three, with copy-paste code.
A size chart popup is the fastest sizing UX upgrade you can make to a Shopify product page. The button sits next to the variant picker; clicking it opens a chart over the page; closing returns the customer to where they were. No back-and-forth navigation, no broken selection — just immediate sizing reference at the moment of the size decision.
Three implementation paths. Pick by how many products you have and how much code you want to write.
Method Comparison
| Method | Time to ship | Cost | Best for |
|---|---|---|---|
| App (Tailor Size Guide, etc.) | 5 min | $5–30/month | Any number of products, non-technical owners |
| Theme code (Liquid) | 15 min | Free | Devs comfortable editing themes, 1 chart for all products |
| Product description HTML | 5 min per product | Free | <10 products, each with its own chart |
| Theme code + metafields | 30 min setup | Free | Devs, multiple chart types across product collections |
For per-product charts via metafields specifically, see our deeper companion guide: how to add a size chart with metafields in Shopify.
Method 1: Shopify App (5 minutes)
- Install Tailor Size Guide from the Shopify App Store.
- Open the dashboard. The default chart template loads automatically.
- Choose "Popup" as the display style from the layout dropdown.
- Customize the chart. Edit rows/columns, add measurements, choose a design template.
- Save and publish. A "Size Chart" button appears on every product page within seconds.
The app handles theme compatibility, mobile responsiveness, popup z-index, ESC-key closing, and styling. No code edits, no theme conflicts.
Why most stores use apps
Method 2: Theme Code (15 minutes)
For one chart used across all products. Edit your theme's product.liquid or product-template.liquid file (path varies by theme; check Online Store → Themes → Edit Code).
Step 1. Add the button next to your variant picker:
<button type="button" class="size-chart-btn" onclick="document.getElementById('size-chart-modal').style.display='flex'">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M2 12h20M12 2v20"/></svg>
Size chart
</button>Step 2. Add the modal at the bottom of the same file (just before the closing tag):
<div id="size-chart-modal" class="size-chart-overlay" onclick="if(event.target===this)this.style.display='none'">
<div class="size-chart-content">
<button class="size-chart-close" onclick="document.getElementById('size-chart-modal').style.display='none'">×</button>
<h2>Size Chart</h2>
<table>
<thead>
<tr><th>Size</th><th>Bust</th><th>Waist</th><th>Hips</th></tr>
</thead>
<tbody>
<tr><td>XS</td><td>32"</td><td>25"</td><td>34"</td></tr>
<tr><td>S</td><td>34"</td><td>27"</td><td>36"</td></tr>
<tr><td>M</td><td>36"</td><td>29"</td><td>38"</td></tr>
<tr><td>L</td><td>38"</td><td>31"</td><td>40"</td></tr>
<tr><td>XL</td><td>40"</td><td>33"</td><td>42"</td></tr>
</tbody>
</table>
</div>
</div>Step 3. Add CSS in theme.css.liquid or base.css:
.size-chart-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 14px;
background: #fff;
border: 1px solid #ccc;
border-radius: 999px;
font-size: 14px;
cursor: pointer;
margin: 8px 0;
}
.size-chart-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.6);
z-index: 1000;
align-items: center;
justify-content: center;
padding: 16px;
}
.size-chart-content {
background: #fff;
border-radius: 12px;
max-width: 600px;
width: 100%;
max-height: 90vh;
overflow-y: auto;
padding: 32px;
position: relative;
}
.size-chart-close {
position: absolute;
top: 12px;
right: 16px;
background: none;
border: none;
font-size: 28px;
cursor: pointer;
}
.size-chart-content table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.size-chart-content th, .size-chart-content td { padding: 8px 12px; border: 1px solid #eee; text-align: left; }
.size-chart-content th { background: #f7f7f7; }
@media (max-width: 600px) {
.size-chart-content { padding: 20px; }
}Step 4. Add ESC-key close at the end of the modal HTML:
<script>
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
const m = document.getElementById('size-chart-modal');
if (m && m.style.display !== 'none') m.style.display = 'none';
}
});
</script>Save, preview the product page, click the button. The popup should open and close cleanly on desktop and mobile.
Method 3: Product Description HTML (5 minutes)
For 1–10 products with different charts. Open a product, switch the description editor to HTML mode, and paste:
<button type="button" onclick="document.getElementById('chart-1').style.display='flex'" style="display:inline-flex;align-items:center;gap:6px;padding:8px 14px;background:#fff;border:1px solid #ccc;border-radius:999px;font-size:14px;cursor:pointer;margin:8px 0;">
Size chart
</button>
<div id="chart-1" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,0.6);z-index:1000;align-items:center;justify-content:center;padding:16px;" onclick="if(event.target===this)this.style.display='none'">
<div style="background:#fff;border-radius:12px;max-width:600px;width:100%;max-height:90vh;overflow-y:auto;padding:32px;position:relative;">
<button onclick="document.getElementById('chart-1').style.display='none'" style="position:absolute;top:12px;right:16px;background:none;border:none;font-size:28px;cursor:pointer;">×</button>
<h2>Size Chart</h2>
<table style="width:100%;border-collapse:collapse;margin-top:16px;">
<tr><th style="padding:8px 12px;border:1px solid #eee;">Size</th><th style="padding:8px 12px;border:1px solid #eee;">Bust</th><th style="padding:8px 12px;border:1px solid #eee;">Waist</th></tr>
<tr><td style="padding:8px 12px;border:1px solid #eee;">S</td><td style="padding:8px 12px;border:1px solid #eee;">34"</td><td style="padding:8px 12px;border:1px solid #eee;">27"</td></tr>
<tr><td style="padding:8px 12px;border:1px solid #eee;">M</td><td style="padding:8px 12px;border:1px solid #eee;">36"</td><td style="padding:8px 12px;border:1px solid #eee;">29"</td></tr>
</table>
</div>
</div>Save the product. The button shows in the description, the popup works. Repeat per product, changing id="chart-1" to chart-2, chart-3, etc., and updating the table data.
Why this doesn't scale
Mobile Responsiveness Checklist
Common Implementation Mistakes
z-index conflicts with cart drawer
Many themes have a cart drawer at z-index 100. Set the popup overlay to 1000+ to avoid the cart drawer covering it.
Body scroll behind the popup
Add document.body.style.overflow='hidden' when opening, restore on close. Otherwise the page scrolls behind the popup on mobile.
No focus management
For accessibility, focus should move to the popup when opened and back to the trigger button on close. Add tabindex="-1" to the modal and JS to manage focus.
Theme upgrade wipes changes
Theme upgrades replace files. If you edit product.liquid directly, an upgrade overwrites your work. Use a duplicate theme for your customized version, or use snippet includes that survive upgrades. Apps avoid this entirely.
FAQs
What's the easiest way to add a size chart popup to Shopify?
Use an app like Tailor Size Guide. 2-minute install, no code.
Can I add a popup without code or apps?
Yes — HTML in the product description. Doesn't scale past ~10 products.
How do I make a size chart popup mobile-friendly?
Percentage widths, max-height scroll, 44px tap target close button.
Should the size chart open in a popup or new page?
Popup. Doesn't break customer's selection on product page.
Will a popup hurt page speed?
If lazy-loaded properly, no — under 50ms impact.
Can I have different size charts for different products?
Yes via metafields — see our metafields guide.
Pick a Method, Ship Today
If you have any inventory size or want zero theme-code maintenance: app. If you have a single chart for all products and a developer: theme code. If you have under 10 products with different charts and you'll never grow: product-description HTML.
For the next-level setup (different charts per product collection, automatically), see our metafields guide. For the why-it-matters context, see our apparel returns playbook.
Skip the code — install Tailor Size Guide.
Two-minute install, popup auto-injects on every product page, mobile-tested, theme-update-proof. Free trial; paid plans from $9/month.