Generate responsive HTML tables with proper styling for data display, comparison tables, or pricing grids.
Generates responsive HTML tables with proper styling for data display, comparison tables, or pricing grids.
/plugin marketplace add vcode-sh/vibe-tools/plugin install greenshift-blocks@vibe-toolsGenerate responsive HTML tables with proper styling for data display, comparison tables, or pricing grids.
greenshift-blocks skill documentation, specifically docs/08-variations.md for table structure<!-- wp:greenshift-blocks/element {"id":"gsbp-XXXXXXX","tag":"table","type":"inner","localId":"gsbp-XXXXXXX","tableAttributes":{"table":{"responsive":"yes"}},"tableStyles":{...},"styleAttributes":{"width":["100%"]}} -->
<table class="gsbp-XXXXXXX">
<!-- Rows here -->
</table>
<!-- /wp:greenshift-blocks/element -->
{
"tag": "table",
"type": "inner",
"tableAttributes": {
"table": {
"responsive": "yes"
}
},
"tableStyles": {
"table": {
"layout": "fixed",
"border": "collapse"
},
"responsive": "yes",
"td": {
"paddingTop": ["6px"],
"paddingBottom": ["6px"],
"paddingRight": ["12px"],
"paddingLeft": ["12px"],
"borderStyle": "solid",
"borderWidth": "1px",
"borderColor": "var(--wp--preset--color--border, #00000012)",
"fontSize": ["14px"]
},
"th": {
"paddingTop": ["6px"],
"paddingBottom": ["6px"],
"paddingRight": ["12px"],
"paddingLeft": ["12px"],
"borderStyle": "solid",
"borderWidth": "1px",
"borderColor": "var(--wp--preset--color--border, #00000012)",
"fontSize": ["16px"],
"backgroundColor": "var(--wp--preset--color--lightbg, #cddceb21)"
}
},
"styleAttributes": {
"width": ["100%"]
}
}
{
"tag": "tr",
"type": "inner"
}
{
"tag": "th",
"textContent": "Header"
}
{
"tag": "td",
"textContent": "Data"
}
The tableStyles object contains styling for different table elements:
{
"layout": "fixed",
"border": "collapse"
}
layout: "fixed" or "auto"border: "collapse" or "separate"Supports all styleAttributes properties:
paddingTop, paddingBottom, paddingLeft, paddingRightborderStyle, borderWidth, borderColorfontSize, color, textAlignSame as td, plus commonly:
backgroundColor: Header backgroundfontWeight: Text weightSet to "yes" to enable mobile responsiveness.
table (gsbp-XXXXXXX)
├── tr (header row)
│ ├── th "Feature"
│ ├── th "Basic"
│ ├── th "Pro"
│ └── th "Enterprise"
├── tr (data row 1)
│ ├── td "Storage"
│ ├── td "10 GB"
│ ├── td "100 GB"
│ └── td "Unlimited"
├── tr (data row 2)
│ └── ...
└── tr (data row n)
└── ...
{
"tableStyles": {
"td": {
"paddingTop": ["16px"],
"paddingBottom": ["16px"],
"paddingRight": ["20px"],
"paddingLeft": ["20px"],
"borderStyle": "none",
"borderBottomWidth": "1px",
"borderBottomStyle": "solid",
"borderBottomColor": "var(--wp--preset--color--border, #e5e5e5)"
},
"th": {
"paddingTop": ["16px"],
"paddingBottom": ["16px"],
"paddingRight": ["20px"],
"paddingLeft": ["20px"],
"backgroundColor": "transparent",
"fontWeight": "600",
"textTransform": "uppercase",
"fontSize": ["12px"],
"letterSpacing": "0.05em",
"borderBottomWidth": "2px",
"borderBottomStyle": "solid",
"borderBottomColor": "var(--wp--preset--color--primary, #000)"
}
}
}
{
"tableStyles": {
"table": {
"border": "collapse"
},
"td": {
"borderWidth": "1px",
"borderStyle": "solid",
"borderColor": "#ddd",
"padding": ["12px"]
},
"th": {
"borderWidth": "1px",
"borderStyle": "solid",
"borderColor": "#ddd",
"backgroundColor": "#f8f9fa",
"padding": ["12px"]
}
}
}
Use dynamicGClasses for alternating colors:
{
"dynamicGClasses": [{
"value": "gs_table_XXX",
"selectors": [{
"value": " tr:nth-child(even) td",
"attributes": {
"styleAttributes": {
"backgroundColor": ["#f9f9f9"]
}
}
}]
}]
}
<!-- wp:greenshift-blocks/element {"tag":"svg","icon":{"icon":{"font":"rhicon rhi-check"},"type":"font"},"styleAttributes":{"fill":["#22c55e"],"width":["20px"]}} -->
<svg>...</svg>
<!-- /wp:greenshift-blocks/element -->
<!-- wp:greenshift-blocks/element {"tag":"svg","icon":{"icon":{"font":"rhicon rhi-times"},"type":"font"},"styleAttributes":{"fill":["#ef4444"],"width":["20px"]}} -->
<svg>...</svg>
<!-- /wp:greenshift-blocks/element -->
When responsive: "yes" is set:
| Type | Suggested Columns | Rows |
|---|---|---|
| Simple data | 2-4 | Any |
| Comparison | 3-5 | 5-10 |
| Pricing | 3-4 | 6-12 |
| Schedule | 5-7 | 5-10 |
table-pricing.html, table-comparison.html)IMPORTANT: Always save output to a .html file. Never just display the code in chat.