Say you sell a hoodie in four colors and six sizes, XS to XXL. A shopper on her phone taps the black one. She scrolls past the photos and lands on a box that says “Choose an option.”
She opens it. Her size isn’t there. She goes back, taps navy, and opens the box again.
That box is the default size picker on most classic WooCommerce themes. It works, but it hides the one thing shoppers most want to know: is my size in stock?
In this guide we’ll turn size into buttons and set the attribute up so it works across your whole catalog. Then we’ll fix the small details that decide whether buttons help: the default size, sold-out sizes, and tap targets.
Dropdowns hide the answer shoppers came for
Baymard Institute, a UX research firm, has tested size selection in its product page studies. In its write-up on size buttons, it describes three problems with dropdowns:
- People miss them. Some testers didn’t notice the size dropdown at all. Others didn’t look and went with whatever size was already selected.
- Stock is a surprise. Shoppers often found out their size was sold out only after they opened the menu. On products with several colors, some had to check each color one by one, and some gave up.
- Errors come next. Testers who missed the selector clicked “Add to cart” and hit an error message they could have avoided.
Phones make it worse. On a narrow screen, shoppers scroll back and forth between the color and size pickers to find a combination that exists.
Buttons fix most of this because every size is on screen before anyone taps. One of Baymard’s testers put it simply: buttons show “straightaway what sizes are available.”
Most large stores already use buttons
In the same article, Baymard reports that 71% of the desktop sites in its benchmark use buttons for size, up from 63% in 2017. Another 28% still use dropdowns. Those numbers come from 2021, but the advice hasn’t changed. Baymard still rates it an “Impactful” guideline, and the guideline page was last updated in September 2026. Its stated goal is fewer returns.
Here’s the short version of the trade-off:
| Dropdown | Size buttons | |
|---|---|---|
| See which sizes exist without tapping | No | Yes |
| See sold-out sizes at a glance | No | Yes, if styled |
| Easy to overlook | Yes | Less likely |
| Space on the page | Small | More, especially on mobile |
| Works out of the box in a classic theme | Yes | Needs a plugin |
The space cost is real, and we’ll deal with it in step 5. It’s not a reason to keep the dropdown.
Step 1: Make Size a global attribute
Buttons are set per attribute, so start there. If your sizes are typed into each product as a custom attribute, move them to one shared, global attribute first.
- Go to Products → Attributes.
- Add an attribute called Size. Leave the slug as
sizeunless you already have one. - Click Configure terms and add your sizes: XS, S, M, L, XL, XXL.
- Put them in the order shoppers expect (smallest to largest), not alphabetical. “L” before “M” before “S” looks broken.
Now add it to a product:
- Open a variable product and go to Product data → Attributes.
- Pick Size from the existing attributes list and select the sizes this product comes in.
- Tick Used for variations, then click Save attributes.
- Open the Variations tab and click Generate variations, or add them one by one.
Why this matters: a global attribute gets one setting for all products. Change Size to buttons once and every hoodie, t-shirt and pair of jeans follows. Custom attributes on each product don’t share that setting.
Step 2: Switch the size dropdown to buttons
How you do this depends on your theme.
On a block theme, WooCommerce’s Add to Cart + Options (Beta) block can show attribute values as pills or as a dropdown. Pills are buttons by another name. WooCommerce also added color swatches to core in version 10.9 as an experimental feature, but that covers a new Color / Image attribute type. Size stays a text option. The classic Add to Cart block still shows a dropdown.
On a classic theme, or if you want more control over the look, you need a swatches plugin. With our free WCBoost Variation Swatches plugin, the steps are:
- Install and activate the plugin.
- Go to Products → Attributes and click Edit under Size.
- Change Type to Button and click Update.
- Style the buttons in Appearance → Customize → WooCommerce → Variation Swatches: shape, size and tooltips.
The plugin can also turn every variation dropdown into buttons automatically, so you may see buttons before you change anything. Use the Type setting when you want Size as buttons and Color as color swatches.
If you don’t see the Type field, check two things. The plugin must be active, and you must be editing a global attribute in Products → Attributes, not a custom one inside a product.
For a fuller look at what core covers and where a plugin still helps, see our post on WooCommerce’s built-in color swatches vs a swatches plugin.
Step 3: Don’t preselect a size
WooCommerce lets you choose a default variation. You set it at the top of each product’s Variations tab. Per the WooCommerce variable product docs, it only appears after you’ve created at least one variation.
For size, leave it empty.
Baymard warns that a preselected size lets shoppers add the product to the cart without ever choosing one. The result is an order in the wrong size. With no default, WooCommerce won’t let anyone add the product until they pick a size, which is exactly what you want.
I’d never preselect a size, even if one size outsells the rest. A wrong-size order means a return, a refund and a customer who now trusts your product page a little less. Making the shopper tap once is a much cheaper price to pay.
A preselected color is a different question, since color is easy to see in the photos. Size isn’t. Check your best sellers first, because the default is set per product and is easy to forget.
Step 4: Make sold-out and selected sizes obvious
Buttons only help if shoppers can read them. Two states matter most.
Sold-out sizes. WooCommerce has a setting at WooCommerce → Settings → Products → Inventory called “Hide out of stock items from the catalog.” For variable products, it only hides a variation when all of these are true:
- stock is managed at the variation level,
- the stock is 0 or the status is “Out of stock”, and
- backorders are turned off.
If any variation allows backorders, it stays visible at zero stock.
Hiding sold-out sizes keeps the row short, but it also hides information. A shopper who wears L and doesn’t see L can’t tell if you’re sold out or never made it. Baymard points to designs where sold-out sizes stay on screen in a state that’s easy to tell apart from available and selected sizes. We think that’s the better default for most clothing stores.
In WCBoost Variation Swatches, the free version can hide or blur options that don’t match what’s already selected. The Pro version adds an option to disable out-of-stock swatches while keeping them visible.
One technical catch: when a product has more than 30 variations, WooCommerce stops filtering options based on what’s already selected. A big product (say 6 colors × 6 sizes = 36) may show sizes as available until the shopper picks them. Test your largest products. A developer can raise the limit with a filter.
The selected size. Make it impossible to confuse with the others. In Baymard’s testing, a thin ring around the selected size left shoppers asking if it was selected at all. A filled background with high-contrast text works better than a subtle outline.

Step 5: Size the buttons for thumbs and handle long ranges
Most size buttons are tapped, not clicked. Two numbers from the W3C’s accessibility guidelines help here:
- 24 × 24 CSS pixels is the minimum target size in WCAG 2.2 at level AA, with exceptions for spaced-out targets.
- 44 × 44 CSS pixels is the stricter “enhanced” level, and W3C suggests aiming for it on important controls.
Size buttons are important controls. Aim for 44 pixels tall, with a small gap between buttons so a thumb doesn’t hit two at once.
For long size ranges, you have a few options:
- Show them all. Baymard points to a shoe store that shows 13 sizes and several widths together, so shoppers can see how one choice affects the other.
- Group them. Split by fit, like Regular, Tall and Petite, then show sizes inside each group. Baymard notes this design wasn’t tested in its studies, so check it on your own store.
- Use a swipe row on mobile. Put sizes in one horizontal row and let the last button get cut off at the screen edge. That cut-off button tells shoppers there’s more to swipe.
If your sizes are numbers (shoe sizes 36–46, waist 28–40), keep them in numeric order and avoid wrapping a single button’s text onto two lines.
Test it like a shopper
Open your best-selling variable product on a phone and run through this list:
- Can you see every size without opening anything?
- Pick a color. Do sizes that are sold out in that color look different?
- Tap “Add to cart” without picking a size. Do you get a clear message?
- Is the selected size obvious at arm’s length?
- Do sizes run smallest to largest?
- On a product with more than 30 variations, do sold-out combinations still show correctly?
If the buttons don’t show up: clear your page cache, then switch to a default theme like Storefront for a minute to test. Some themes replace WooCommerce’s variable product template, and some quick-view and product-builder plugins use their own size picker.
Your next step
Pick one product today, the one that sells most in the most sizes. Switch its Size attribute to buttons, remove any default size, and look at it on your phone. If it’s easier to use, roll it out to the rest. Our guide to showing the right product images when a customer picks a color covers the other half of a good variation picker.
