
On a website, how you compare service plans and present pricing is a critical factor that directly impacts conversions. By implementing the Pricing Table Module, you can build a functional and professional pricing comparison table that aligns with your brand—all without needing constant help from an engineer.


On a website, how you compare service plans and present pricing is a critical factor that directly impacts conversions. By implementing the Pricing Table Module, you can build a functional and professional pricing comparison table that aligns with your brand—all without needing constant help from an engineer.
The primary objective of this module is to increase information transparency and strongly support user decision-making.
This section covers the process from applying the code in the Design Manager to final configuration in the page editor.
To enable advanced table functionality, perform the following in the Design Manager:
Create a new page (such as a Landing Page) from the HubSpot admin dashboard. Search for the module name in the left sidebar of the editor, then drag and drop it into the desired editing area.
Once the code is applied, you can fine-tune the details via the no-code side panel in the page editor:
Create a "New Module" in the HubSpot Design Manager and paste the following code into each respective section.
This is the field definition. It consists of a repeater field (Items) and style setting fields (Styles).
[
{
"children": [
{
"allow_new_line": false,
"display_width": null,
"id": "ed9560c9-9c1c-0441-0faf-e9550904cfa6",
"label": "title",
"locked": false,
"name": "title",
"required": false,
"type": "text"
}
],
"default": [],
"display_width": null,
"expanded": false,
"group_occurrence_meta": null,
"id": "c179193d-d8a5-7392-e6fc-6b3d06e993e9",
"label": "columns",
"locked": false,
"name": "columns",
"occurrence": {},
"required": false,
"tab": "CONTENT",
"type": "group"
},
{
"children": [
{
"allow_new_line": false,
"display_width": null,
"id": "d7805557-6ec3-59cf-119a-3a052f27dad6",
"label": "title",
"locked": false,
"name": "title",
"required": false,
"type": "text"
},
{
"default": false,
"display": "checkbox",
"display_width": null,
"id": "6ad38bcb-6b06-63a3-9001-ebe8efd355f5",
"label": "is_example",
"locked": false,
"name": "is_example",
"required": false,
"type": "boolean"
},
{
"children": [
{
"display_width": null,
"id": "966af101-ccd3-c4db-a10b-3050a3c423fd",
"label": "content",
"locked": false,
"name": "content",
"required": false,
"type": "richtext"
},
{
"default": false,
"display": "checkbox",
"display_width": null,
"id": "602c9712-5e63-c97e-7aca-d5ef1e4acf3f",
"label": "highlight",
"locked": false,
"name": "highlight",
"required": false,
"type": "boolean"
}
],
"default": [],
"display_width": null,
"expanded": false,
"group_occurrence_meta": null,
"id": "4b422ad5-7d67-db73-cdc1-94e1320642ee",
"label": "cells",
"locked": false,
"name": "cells",
"occurrence": {},
"required": false,
"tab": "CONTENT",
"type": "group"
}
],
"default": [],
"display_width": null,
"expanded": false,
"group_occurrence_meta": null,
"id": "061a08e6-3523-bbb7-ce39-1b111ac42aa0",
"label": "rows",
"locked": false,
"name": "rows",
"occurrence": {},
"required": false,
"tab": "CONTENT",
"type": "group"
},
{
"children": [
{ "default": { "color": null, "opacity": null }, "id": "515623f8-4fa2-645b-5086-4a968101c60c", "label": "header_bg_color", "name": "header_bg_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "96bbe9fa-b7e4-f1c2-ede4-cdb715c4de38", "label": "header_text_color", "name": "header_text_color", "type": "color" },
{ "display": "text", "id": "e766f233-5e0e-5134-7e0e-7580595ee79b", "label": "header_font_size", "name": "header_font_size", "type": "number" },
{ "display": "text", "id": "6dc0dc16-74d1-01d0-191a-df347869131e", "label": "header_padding", "name": "header_padding", "type": "number" },
{ "default": { "color": null, "opacity": null }, "id": "775f2e3b-8ff3-8d87-0321-ecdc42b1e2ac", "label": "row_title_bg_color", "name": "row_title_bg_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "7507e164-c68a-a8ad-f6c2-761eb0c5102a", "label": "row_title_text_color", "name": "row_title_text_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "e6b750b8-64dd-2f9c-742a-2fbff12e6cc3", "label": "content_bg_color", "name": "content_bg_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "ea8a1a14-c964-e9b7-360b-9abea479d953", "label": "content_text_color", "name": "content_text_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "3417db6a-c059-3069-a9e4-b3683340b2a7", "label": "highlight_bg_color", "name": "highlight_bg_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "ad2b046b-2a21-c01e-927d-a4f8b1e7b58d", "label": "highlight_text_color", "name": "highlight_text_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "73861370-bc2f-10c2-8cc7-80535299e608", "label": "example_row_bg_color", "name": "example_row_bg_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "bc2a46db-f8f0-35b0-1e0c-b890b29fd466", "label": "example_row_text_color", "name": "example_row_text_color", "type": "color" },
{ "default": { "color": null, "opacity": null }, "id": "542c512e-4e10-7827-292b-d6446f54ef78", "label": "border_color", "name": "border_color", "type": "color" },
{ "display": "text", "id": "ca1c6f42-30f0-a850-7088-34b84e7cb3da", "label": "border_width", "name": "border_width", "type": "number" },
{ "display": "text", "id": "98e77063-97b2-4169-ba7f-fc157f640e47", "label": "font_size", "name": "font_size", "type": "number" },
{ "display": "text", "id": "de62c8f1-1e30-7799-5c12-993ba149848f", "label": "cell_padding", "name": "cell_padding", "type": "number" },
{ "display": "text", "id": "73dc7a53-67ab-6e86-f5cc-4e7982d282d5", "label": "first_column_width", "name": "first_column_width", "type": "number" }
],
"id": "84432453-92c7-d5bc-237b-0c33d0abe501",
"label": "style",
"name": "style",
"tab": "CONTENT",
"type": "group"
}
]{% require_css %}
<style>
.custom-pricing-table {
width: 100%; max-width: 1400px; margin: 0 auto; display: grid;
grid-template-columns: {{ module.style.first_column_width|default(300) }}px repeat({{ module.columns|length }}, 1fr);
gap: 0;
}
.pricing-table__cell {
padding: {{ module.style.cell_padding|default(20) }}px;
border: {{ module.style.border_width|default(1) }}px solid {{ module.style.border_color.color|default('#CCCCCC') }};
display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
font-size: {{ module.style.font_size|default(16) }}px; line-height: 1.6; min-height: 60px;
}
.pricing-table__cell--header {
background-color: {{ module.style.header_bg_color.color|default('#FFD700') }};
color: {{ module.style.header_text_color.color|default('#000000') }};
font-weight: bold; font-size: {{ module.style.header_font_size|default(24) }}px;
padding: {{ module.style.header_padding|default(30) }}px;
}
.pricing-table__cell--row-title {
background-color: {{ module.style.row_title_bg_color.color|default('#FFD700') }};
color: {{ module.style.row_title_text_color.color|default('#000000') }};
font-weight: bold; align-items: flex-start; text-align: left;
padding-left: {{ module.style.cell_padding|default(20) * 1.5 }}px;
}
.pricing-table__cell--content {
background-color: {{ module.style.content_bg_color.color|default('#F5F5F5') }};
color: {{ module.style.content_text_color.color|default('#000000') }};
}
.pricing-table__cell--highlight {
background-color: {{ module.style.highlight_bg_color.color|default('#FFFFFF') }};
color: {{ module.style.highlight_text_color.color|default('#FFD700') }};
}
@media (max-width: 768px) {
.custom-pricing-table { display: block; }
.pricing-table__cell--header { display: none; }
.pricing-table__cell--content::before {
content: attr(data-label); font-weight: bold; min-width: 120px; margin-right: 15px; flex-shrink: 0;
}
}
</style>
{% end_require_css %}
<div class="custom-pricing-table">
{# プラン名ヘッダー #}
<div class="pricing-table__cell pricing-table__cell--empty"></div>
{% for column in module.columns %}
<div class="pricing-table__cell pricing-table__cell--header">{{ column.title }}</div>
{% endfor %}
{# 各行データ #}
{% for row in module.rows %}
<div class="pricing-table__cell pricing-table__cell--row-title {% if row.is_example %}pricing-table__cell--example-title{% endif %}">
{{ row.title }}
</div>
{% for cell in row.cells %}
<div class="pricing-table__cell {% if row.is_example %}pricing-table__cell--example-content{% else %}pricing-table__cell--content{% endif %} {% if cell.highlight %}pricing-table__cell--highlight{% endif %}" data-label="{{ module.columns[loop.index0].title }}">
{{ cell.content }}
</div>
{% endfor %}
{% endfor %}
</div>.custom-pricing-table { width: 100%; max-width: 1400px; margin: 0 auto; }
.pricing-table__row { display: grid; grid-template-columns: {{ module.style.first_column_width }}px repeat({{ module.columns|length }}, 1fr); gap: 0; }
.pricing-table__cell {
padding: {{ module.style.cell_padding }}px;
border: {{ module.style.border_width }}px solid {{ module.style.border_color.color }};
display: flex; align-items: center; justify-content: center; text-align: center;
}
@media (max-width: 768px) {
.pricing-table__cell--content { flex-direction: column !important; align-items: center !important; text-align: center !important; }
.pricing-table__cell--content::before { text-align: center !important; width: 100%; margin-bottom: 8px; }
}(function() {
const tables = document.querySelectorAll('.custom-pricing-table');
tables.forEach(table => {
// 初期化ログや、モバイル向けのスワイプ処理等の追加が可能
console.log('Pricing table initialized');
});
})();Yes. By enabling the "is_example" setting for a row or using the "highlight" setting for individual cells, you can apply unique background colors to guide the user's focus.
While there is no technical limit, 3 to 4 columns are recommended for the best experience on desktop. Since the module automatically switches to a single-column card format on mobile, you don't have to worry about the layout breaking for mobile users.
Yes. The cell input fields use a "Rich Text" format, allowing you to freely insert links, bold text, or other text decorations directly within the editor.
We can customize this sample to match your specific business requirements.
Book Free ConsultationPut it on Trello!Need a fix for HubSpot, CMS, or GAS? Post it on Trello.
Development Requests Here