Mattress Dimensions Table Setup Guide

Mattress size names vary between ranges and regions. A useful table shows the actual length, width, and depth of the selected mattress. This tutorial also separates delivery packaging from sleeping-surface dimensions so customers can compare the product with their bed frame.

Setup tutorial · TableFlow · Updated 2026-09-07 · By Activory

Try the storefront example

Select the three sample products. The first shows all six rows. The second has two empty fields, so those rows disappear. The third has no values, so the whole table disappears. You can also choose Missing variant values inside the example to hide only the selected variant’s missing rows.

Storefront example
Choose a sample product

The first product option shows all six specification rows.

Hide empty fields in your store

In the theme editor, open the TableFlow app embed and leave Empty value placeholder blank. These are sample products.

This example uses TableFlow storefront code with sample data and the settings below. Your theme’s fonts and available width can change the result. Example links show their destination; purchase controls use a sample cart. Use the checks below to confirm the finished setup in your store.

Build it in TableFlow

The images below show the TableFlow form code with local sample data, captured on 2026-09-07. Shopify navigation and action bars are outside the cropped area.

1. Prepare the metafields

In Shopify, open Settings → Custom data. Create the six definitions in Sample data and content as Single line text. Use Products for Construction and Cover care. Use Variants for Mattress width, Mattress length, Mattress depth, and Packed dimensions. Reuse an existing definition if it stores the same information.

Open your test product and enter the sample values in the product and variant metafields. Add the product tag mattress-specifications to this test product, then save. We will use this tag to control where the table appears. For images of these Shopify controls, see the product metafield guide and variant metafield guide.

2. Name the specification table

In TableFlow, create a specification table. Enter Mattress Dimensions Table in Table name. This name is for your admin. Leave Table ranking at 1st. Set Status to Published when you are ready to save the finished setup.

TableFlow Table name set to Mattress Dimensions Table, Table ranking set to 1st, and Status set to Published

Table name identifies the table in TableFlow. The section title in the next step is the heading that shoppers see. Select the image to view it at full size.

3. Add the first row

Under Table content, enter Specifications in Section title. In the first row, enter Mattress width in Label and select Advance in Source. Then select Search metafields, above the Advance value field.

TableFlow Table content with Specifications as the section title, Mattress width as the label, and the Search metafields control above Advance value

Select Search metafields to connect this row to its variant value. Select the image to view it at full size.

4. Select the value and complete the six rows

In Search metafields, enter custom.mattress_width. Select Mattress width with the Variant - single_line_text_field description. Select Insert in the selection window. The Advance value field will contain ::custom.mattress_width.

Search metafields with custom.mattress_width entered and the Mattress width variant metafield selected

This image shows the search field and selected result. The Insert button is in the Shopify action bar outside this crop. Select the image to view it at full size.

Select Add row and repeat this process for the other five rows in Sample data and content. Keep Source set to Advance. Match the result to the Scope column for each row. A Product result supplies a value shared by the product. A Variant result supplies a value for the selected option. The stored product or variant value supplies the storefront text; do not type the sample measurement into Advance value.

Show the completed six-row setup
Completed Mattress Dimensions Table with six labels and their custom metafield references

Check the row order and metafield keys against this completed example. Select the image to view it at full size.

5. Choose which products show the table

Under Display condition, set Attribute to Tagged with and Condition to Match any. In Values, enter mattress-specifications and select the matching option to add the tag. Only apply this tag to products that should use this specification table. Use your test product first.

TableFlow Display condition with Tagged with, Match any, and the mattress-specifications tag selected

The tag must also be present on the Shopify product. This keeps the table limited to the intended products. Select the image to view it at full size.

6. Select the table location and save

Under Table locations, select Location 1. Leave the other locations clear for this example. Check the six rows, display condition, and Published status, then select Save in TableFlow.

TableFlow Table locations with only Location 1 selected

Use the same location number in the TableFlow app block in the next step. Select the image to view it at full size.

7. Add the table to the product template

Open the product template in the Shopify theme editor. Enable the TableFlow app embed. Clear Empty value placeholder so it is blank. This makes TableFlow hide rows with missing values and hide the whole table if every row is empty.

Add the TableFlow - Specification app block and select table location 1. Match the example settings, then save the theme. Open the tagged test product in your storefront and change its variant. Check the specification values, then clear one test value to confirm that its row disappears.

Example settings

  • This example uses 18 px title text, 14 px row text, 40% label width, row borders, and 5 px cell padding. Empty value placeholder is blank. Hiding starts after the storefront script loads; entering a dash in this setting keeps missing rows visible instead.
  • The custom-data definitions, scopes, and values below produce the example. The second sample variant has no variant metafield values.
  • Cloud foam mattress: all six fields use the sample values below.
  • Pocket spring mattress: leave Packed dimensions and Cover care empty. Other changes: Mattress width = 90 cm; Mattress length = 190 cm; Mattress depth = 22 cm; Construction = Pocket spring core with a foam comfort layer.
  • Guest mattress: leave all six mapped metafields empty. The table and its heading are hidden.

Sample data and content

Use these values for a test. Replace them with checked product data, published destinations, and offers that your store can supply.

DetailSuggested metafield keyScopeMetafield typeExample value
Mattress widthcustom.mattress_widthVariantSingle line text150 cm
Mattress lengthcustom.mattress_lengthVariantSingle line text200 cm
Mattress depthcustom.mattress_depthVariantSingle line text25 cm
Packed dimensionscustom.packed_dimensionsVariantSingle line text160 x 40 x 40 cm
Constructioncustom.mattress_constructionProductSingle line textFoam core with a quilted comfort layer
Cover carecustom.cover_careProductSingle line textNon-removable cover; spot clean only

Can I use a named mattress size instead of measurements?

Store dimensions on each size variant instead of deriving them from a name such as queen. Keep packed dimensions distinct from the expanded mattress. If a firmness label is specific to your brand, explain its scale in the product content rather than treating it as a universal measurement.

  1. Collect the dimensional specification for each size sold in your market. Keep regional naming separate from numeric values.
  2. Add width, length, depth, and packed-size fields to the variants. Enter construction facts on the product where they are shared.
  3. Group TableFlow rows into mattress fit and delivery details. Link to your return terms outside the dimensions table.
  4. Select every size on the storefront and confirm that the measured values change with the actual purchase option.

Read the TableFlow setup guide for the full app controls and placement options. Use the variant metafield guide for rows that change with an option.

Check the finished setup

  • Compare the mattress measurements with the product’s regional size label and packaging record.
  • Check that the cover-care text does not imply a removable cover unless that is true.
  • Confirm that any expansion or handling instructions come from the supplied product documentation.

Common mistakes

  • Do not promise that a mattress fits every frame with the same named size.
  • Do not turn a firmness label into a health or sleep outcome claim.

Supported use

TableFlow displays the values you supply. It does not measure products or verify supplier claims. Use product fields for shared facts and variant fields for facts that change with the selected option. Confirm the app embed and table placement in your theme.

TableFlow features, current app plans, and Shopify metafield types and accepted values explain the supported setup.

Browse all TableFlow tutorials. Read how the examples are made or report a correction.

Was this page helpful?