Charts · Gutenberg

Data Table block for WordPress

Interactive data table with sorting, search, pagination and export.

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.

Get Blockenberg

What it actually does

Interactive data table with sorting, search, pagination and export.

Inspector panels on this block: Features, Layout, Header Colors, Cell Colors, Import Data. Those titles come from index.js, not from a shared template.

Behavior controls: “Responsive Mode” options: Horizontal Scroll, Stack on Mobile; “Caption Position” options: Top, Bottom; “Table Style” options: Default, Bordered, Minimal; “Paste CSV Data” (First row will be used as headers).

Where to find it

Gutenberg inserter → Charts → search “Data Table” (block name `blockenberg/data-table` in block.json). Style it in the sidebar after insert.

How to use Data Table block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Data Table”, insert it. Category: Charts.
  3. Configure inspector controls that exist on this block. Open Features. Set “Enable Search”, “Search Placeholder”, “Enable Sorting”, “Enable Pagination”.
  4. Check the published page. The view script reads HTML data attributes: data-export, data-initialized, data-paginate, data-per-page, data-search, data-sort, data-sortable. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Enable SearchOn/off toggle in the inspector. On by default. Saved as `searchEnabled`.
Search PlaceholderText field in the inspector. block.json default: Search.... Saved as `searchPlaceholder`.
Enable SortingOn/off toggle in the inspector. On by default. Saved as `sortingEnabled`.
Enable PaginationOn/off toggle in the inspector. Off by default. Saved as `paginationEnabled`.
Items Per PageNumeric range control in the inspector. Range 5–100. block.json default: 10. Saved as `itemsPerPage`.
Enable ExportOn/off toggle in the inspector. On by default. Saved as `exportEnabled`.
Export Button TextText field in the inspector. block.json default: Export CSV. Saved as `exportCsvText`.
Sticky HeaderOn/off toggle in the inspector. Off by default. Saved as `stickyHeader`.
Sticky First ColumnOn/off toggle in the inspector. Off by default. Saved as `stickyFirstColumn`.
Zebra StripingOn/off toggle in the inspector. On by default. Saved as `zebraStriping`.
Row Hover HighlightOn/off toggle in the inspector. On by default. Saved as `rowHoverHighlight`.
Responsive ModeSelect control; the chosen value is saved on the block. Options: Horizontal Scroll; Stack on Mobile. block.json default: scroll. Saved as `responsiveMode`.
CaptionText field in the inspector. Saved as `caption`.
Caption PositionSelect control; the chosen value is saved on the block. Options: Top; Bottom. block.json default: bottom. Saved as `captionPosition`.
Table StyleSelect control; the chosen value is saved on the block. Options: Default; Bordered; Minimal. block.json default: default. Saved as `tableStyle`.
Cell PaddingNumeric range control in the inspector. Range 6–24. block.json default: 12. Saved as `cellPadding`.
Border WidthNumeric range control in the inspector. Range 0–3. block.json default: 1. Saved as `borderWidth`.
Border RadiusNumeric range control in the inspector. Range 0–16. block.json default: 8. Saved as `borderRadius`.
Typography — HeaderShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoHeader`.
CellShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoCell`.
Header Colors — BackgroundColor control in the inspector. block.json default: #f8fafc. Saved as `headerBg`.
Header Colors — TextColor control in the inspector. block.json default: #1e293b. Saved as `headerColor`.
Header Colors — BorderColor control in the inspector. block.json default: #e2e8f0. Saved as `headerBorderColor`.
Cell Colors — BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `cellBg`.
Alt BackgroundColor control in the inspector. block.json default: #f8fafc. Saved as `cellBgAlt`.
Cell Colors — TextColor control in the inspector. block.json default: #475569. Saved as `cellColor`.
Cell Colors — BorderColor control in the inspector. block.json default: #e2e8f0. Saved as `cellBorderColor`.
Hover BackgroundColor control in the inspector. block.json default: #f1f5f9. Saved as `hoverBg`.
AccentColor control in the inspector. block.json default: #3b82f6. Saved as `accentColor`.
Paste CSV DataMultiline text field in the inspector. First row will be used as headers.

What the front-end script actually does

When this is the right block

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 Data Table block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Data Table”. It sits under Charts. After insert, open Features and set “Enable Search”, “Search Placeholder”, “Enable Sorting”, “Enable Pagination”.

What makes Data Table different from other Blockenberg blocks?

Interactive data table with sorting, search, pagination and export. Inspector labels on this block include “Enable Search”, “Search Placeholder”, “Enable Sorting”, “Enable Pagination”.

Is the Data Table Gutenberg block free?

Yes. Data Table ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Data 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: Features, Layout, Header Colors, Cell Colors).

Related charts blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Data Table from the Gutenberg inserter.

Get Blockenberg