Content · Gutenberg
Accordion Table block for WordPress
A data table where each row expands on click to reveal rich detail content — specs, bullet points, sub-data, or notes. Perfect for pricing tiers, product specs, API docs, and comparison matrices.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
A data table where each row expands on click to reveal rich detail content — specs, bullet points, sub-data, or notes. Perfect for pricing tiers, product specs, API docs, and comparison matrices.
Inspector panels on this block: Columns, Rows, Behaviour, Appearance. Those titles come from index.js, not from a shared template.
Behavior controls: “L” options: C, R; “Detail type” options: Bullet list, Text paragraph; “Expand icon” options: Chevron (▼), Plus (+), Arrow (▶); “Expand icon position” options: Right, Left.
Where to find it
Gutenberg inserter → Content → search “Accordion Table” (block name `blockenberg/accordion-table` in block.json). Style it in the sidebar after insert.
How to use Accordion Table block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Accordion Table”, insert it. Category: Content.
- Configure inspector controls that exist on this block. Open Columns. Set “L”, “Badge text (optional)”, “Highlight this row”, “Detail section title”.
- Check the published page. The view script reads HTML data attributes: data-opts, data-rendered. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| L | Select control; the chosen value is saved on the block. Options: C; R. |
| Badge text (optional) | Text field in the inspector. |
| Highlight this row | On/off toggle in the inspector. |
| Detail section title | Text field in the inspector. |
| Detail type | Select control; the chosen value is saved on the block. Options: Bullet list; Text paragraph. |
| Allow multiple rows open simultaneously | On/off toggle in the inspector. Off by default. Saved as `allowMultiple`. |
| Show row numbers | On/off toggle in the inspector. Off by default. Saved as `showRowNumbers`. |
| Striped rows | On/off toggle in the inspector. On by default. Saved as `stripedRows`. |
| Expand icon | Select control; the chosen value is saved on the block. Options: Chevron (▼); Plus (+); Arrow (▶). block.json default: chevron. Saved as `expandIcon`. |
| Expand icon position | Select control; the chosen value is saved on the block. Options: Right; Left. block.json default: right. Saved as `expandIconPosition`. |
| Animation duration (ms) | Numeric range control in the inspector. Range 80–600. block.json default: 240. Saved as `animDuration`. |
| Max width (px) | Numeric range control in the inspector. Range 300–1400. block.json default: 900. Saved as `maxWidth`. |
| Border radius (px) | Numeric range control in the inspector. Range 0–24. block.json default: 10. Saved as `borderRadius`. |
| Cell padding V | Numeric range control in the inspector. Range 6–32. block.json default: 14. Saved as `cellPaddingV`. |
| Cell padding H | Numeric range control in the inspector. Range 6–40. block.json default: 16. Saved as `cellPaddingH`. |
| Padding top | Numeric range control in the inspector. Range 0–120. block.json default: 0. Saved as `paddingTop`. |
| Padding bottom | Numeric range control in the inspector. Range 0–120. block.json default: 0. Saved as `paddingBottom`. |
| Typography — Header | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `headerTypo`. |
| Cells | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `cellTypo`. |
| Detail | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `detailTypo`. |
| Colors — Background | Color control in the inspector. block.json default: #ffffff. Saved as `bgColor`. |
| Header background | Color control in the inspector. block.json default: #f8fafc. Saved as `headerBg`. |
| Header text | Color control in the inspector. block.json default: #374151. Saved as `headerColor`. |
| Row background | Color control in the inspector. block.json default: #ffffff. Saved as `rowBg`. |
| Row alt background | Color control in the inspector. block.json default: #f9fafb. Saved as `rowAltBg`. |
| Row text | Color control in the inspector. block.json default: #1f2937. Saved as `rowColor`. |
| Row hover | Color control in the inspector. block.json default: #f0f4ff. Saved as `rowHoverBg`. |
| Highlighted row bg | Color control in the inspector. block.json default: #f0f0ff. Saved as `highlightRowBg`. |
| Highlighted row border | Color control in the inspector. block.json default: #6366f1. Saved as `highlightRowBorder`. |
| Detail panel bg | Color control in the inspector. block.json default: #f8fafc. Saved as `detailBg`. |
| Detail text | Color control in the inspector. block.json default: #374151. Saved as `detailColor`. |
| Table border | Color control in the inspector. block.json default: #e5e7eb. Saved as `borderColor`. |
| Icon color | Color control in the inspector. block.json default: #9ca3af. Saved as `iconColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts, data-rendered.
- A multiple-open flag on the wrapper decides whether several panels can stay open.
When this is the right block
- A data table where each row expands on click to reveal rich detail content — specs, bullet points, sub-data, or notes. Perfect for pricing tiers, product specs, API docs, and comparison matrices — that is the job of Accordion Table, not a generic content block.
- Use it when you need the editor control labeled “L”, which exists on this block’s inspector.
- It matches pages about accordion, table, expandable.
- Inserter grouping: articles, cards, lists, and long-form layouts.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Accordion Table block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Accordion Table”. It sits under Content. After insert, open Columns and set “L”, “Badge text (optional)”, “Highlight this row”, “Detail section title”.
What makes Accordion Table different from other Blockenberg blocks?
A data table where each row expands on click to reveal rich detail content — specs, bullet points, sub-data, or notes. Perfect for pricing tiers, product specs, API docs, and comparison matrices. Inspector labels on this block include “L”, “Badge text (optional)”, “Highlight this row”, “Detail section title”.
Is the Accordion Table Gutenberg block free?
Yes. Accordion Table ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Accordion Table to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Columns, Rows, Behaviour, Appearance).
Related content blocks
Accordion
Collapsible accordion panels for FAQ, features, and more.
Icon Accordion
Visually rich accordion with per-item icons, badges and custom colours — great for FAQs, feature lists and onboarding flows.
Image Text Rows
Multiple alternating image + text rows in one block. Perfect for feature descriptions, how-it-works sections, and product showcases.
Media & Text Rows
Repeatable alternating image-and-text rows — each row independently flippable. Classic landing-page pattern for feature breakdowns and storytelling.
Toggle / Read More
A single expandable panel for 'Read More', spoilers, or collapsible content sections.
Alert / Notice
Info, success, warning or error notice block with icon, title and body text. Pure CSS — zero JS.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Accordion Table from the Gutenberg inserter.