A specifications table is not only a design element. It is a product-data model. Shopify metafields keep the values attached to the product while the theme owns labels, order, responsive behavior, and accessibility.
Why product-description tables become difficult
Tables pasted into product descriptions are easy to start and hard to govern. Formatting drifts, empty rows remain visible, labels change between products, mobile behavior breaks, and a theme redesign requires editing content one product at a time.
Metafields separate content from presentation. A merchant enters a dimension or material value in the product admin, and a compatible theme connects that value as a dynamic source. If the theme needs a layout it does not support, Liquid can reference the metafield directly.
Step 1: model the information
List the facts customers use to compare products. Group fields by meaning and choose the narrowest useful type. Measurements should not be stored as unstructured marketing copy when a measurement type will support cleaner data.
- Single-line text: model number or material name
- Measurement: weight, length, width, or height
- Boolean: a true/false characteristic
- List: compatible devices, included items, or features
- File: a manual, certification, or technical sheet
- Metaobject reference: a reusable structured record with several related fields
Use Shopify’s standard product taxonomy and category metafields where they already represent the attribute. Create custom definitions for information specific to the business.
Step 2: create clear definitions
In Shopify admin, go to Settings → Metafields and metaobjects → Products and add a definition. Give each field a plain merchant-facing name, a stable namespace and key, a helpful description, and validation where appropriate.
Example: “Material” might use custom.material with a single-line text type. “Product width” might use custom.product_width with a measurement type. Stable keys matter because theme code and integrations can depend on them.
Step 3: add values to products
Populate a representative sample before changing the theme: simple and complex products, products with missing values, long values, and different units. This reveals whether the model works before it is repeated across the catalog.
For large catalogs, plan bulk entry or integration carefully. Decide whether Shopify, an ERP, a PIM, or another system is the source of truth so updates do not overwrite one another.
Step 4: display the values
Use dynamic sources when the theme supports them
In the theme editor, add a compatible text, row, or collapsible-content block and connect its dynamic-source icon to the relevant product metafield. This approach keeps the implementation editable and avoids unnecessary custom code.
Use Liquid for a custom table
When several fields need one responsive table, create a theme section or snippet and render only values that exist. The simplified pattern below illustrates the condition; adapt names, escaping, localization, units, and markup to the store.
{% assign material = product.metafields.custom.material.value %}
{% assign width = product.metafields.custom.product_width.value %}
{% if material != blank or width != blank %}
<table>
<caption>Product specifications</caption>
<tbody>
{% if material != blank %}
<tr><th scope="row">Material</th><td>{{ material | escape }}</td></tr>
{% endif %}
{% if width != blank %}
<tr><th scope="row">Width</th><td>{{ width }}</td></tr>
{% endif %}
</tbody>
</table>
{% endif %}
Table or collapsible section?
Use a visible table when specifications are central to the buying decision and customers compare rows. A collapsible section can reduce page length when the information is secondary, but the label should be specific—“Dimensions and materials” is clearer than “More information.”
On mobile, preserve meaningful row headers. Avoid layouts that turn every row into an unexplained pair of values. Test zoom, long translations, and screen-reader reading order.
Keep the implementation maintainable
- Document the owner and definition of every field.
- Hide empty values rather than showing blank labels.
- Localize labels in the theme instead of embedding them in every product.
- Do not change namespace or key after integrations depend on them without a migration plan.
- Test theme updates in a duplicate theme and confirm dynamic-source connections remain intact.
- Use metaobjects when repeated records outgrow a flat list of fields.
Sources
- Shopify Help Center. Metafields.
- Shopify Help Center. Displaying metafields on your online store.
- Shopify Help Center. Adding values to metafields.
