Elementor Widget

The TableCrafter Data Table widget brings your JSON, CSV, and Google Sheets data into the Elementor editor with visual controls and a true live preview, so you design tables against real data instead of guessing.

tablecrafter-data-tableLive PreviewVisual ControlsStyle TabElementor 3.5+

Overview

TableCrafter ships a native Elementor widget that wraps the same rendering engine used by the [tablecrafter] shortcode and the Gutenberg block. Instead of typing shortcode attributes, you configure the table through Elementor's standard control panel: a Content tab for data and behavior, and a Style tab for typography, colors, borders, and spacing.

The standout feature is the live data preview. When you drop the widget on the canvas and point it at a data source, the editor fetches a sample of your real data and renders it in place, complete with feature badges showing which interactive tools (search, filters, export, auto-refresh) will appear on the published page.

ℹ️

The widget only loads when Elementor is active. On the frontend it builds a standard [tablecrafter] shortcode under the hood, so every table behaves identically whether placed via Elementor, Gutenberg, or a raw shortcode.

Requirements

Adding the Widget

  1. Edit any page or post with Edit with Elementor.
  2. In the widget panel search box, type TableCrafter (or browse the dedicated TableCrafter widget category).
  3. Drag the TableCrafter Data Table widget onto your layout.
  4. In the Data Source section, choose a Source Type and paste your Data Source URL.
  5. Adjust display, advanced, and style options. The canvas preview updates as you work.

The widget lives in both the general widgets list and a dedicated TableCrafter category with a table icon, so you can find it quickly even on busy sites with many third-party widgets.

Data Source Controls

This section (Content tab) tells TableCrafter where to read data and which columns to keep.

ControlRequiredDescription
source_typeRequiredSelect box: API URL / JSON File, Google Sheets, or CSV File. Defaults to API URL. Choosing Google Sheets reveals an inline setup tip.
data_sourceRequiredA URL control holding your JSON API, CSV file, or public Google Sheets link. Supports Elementor dynamic tags. Maps to the shortcode source attribute.
root_pathOptionalDot-path to a nested array in a JSON response (e.g. data.results). Shown only for the API URL source type. Maps to root.
include_columnsOptionalComma-separated list of keys to display. Leave empty to show all. Maps to include.
exclude_columnsOptionalComma-separated list of keys to hide. Maps to exclude.
ℹ️

For Google Sheets, the widget's inline help suggests the CSV gviz export format: https://docs.google.com/spreadsheets/d/[ID]/gviz/tq?tqx=out:csv. The sheet must be shared so anyone with the link can view it.

Display Options

These switches and fields (Content tab) control which interactive tools render and how rows paginate and sort.

ControlDefaultDescription
enable_searchyesToggle the global search box above the table. Maps to search.
enable_filtersyesToggle automatic column filters (dropdowns, date ranges, number ranges). Maps to filters.
enable_exportoffAllow visitors to export the current view as CSV, Excel, or PDF. Maps to export.
per_page25Rows shown per page (1–1000). Set to 0 to disable pagination. Maps to per_page.
sort_columnColumn name to sort by on initial load.
sort_orderascAscending or descending. Combined with the sort column into the shortcode sort="column:direction" attribute. Only shown once a sort column is set.

As of version 3.5.6 the export handler produces a genuine OOXML .xlsx workbook and a structurally valid PDF, so enabling Data Export gives clients real, openable files rather than renamed HTML.

Advanced Features

The Advanced section (Content tab) covers live data refreshing, caching, editor preview behavior, and fallback messaging.

ControlDefaultDescription
auto_refreshoffPeriodically re-fetch data from the source on the frontend. Maps to auto_refresh.
refresh_interval300Seconds between refreshes (30 to 86400). Shown only when auto-refresh is on. Passed to the shortcode refresh_interval (converted to ms by the engine).
cache_duration15Minutes to cache fetched data (0–1440). Set to 0 to disable. Maps to the cache attribute.
enable_live_previewyesRender live data inside the Elementor editor. Disable if a heavy source slows the editor.
preview_rows5Number of rows to fetch for the editor preview (1–25). Shown only when live preview is enabled.
loading_message"Loading data..."Text shown while data is being fetched on the frontend.
error_message"Unable to load data. Please try again."Text shown when a frontend data fetch fails.

How the Live Preview Works

Live preview is what separates the Elementor widget from a plain shortcode. The mechanics:

⚠️

The editor preview is a curated sample: limited rows and no interactive tools. The published page always renders the full dataset with every enabled feature. A footer note in the preview ("Full table with all features will be displayed on the frontend") reinforces this.

When no source is set, the widget shows a placeholder prompting you to configure a data source. If live preview is switched off, it shows a compact summary card listing the source host instead of fetching data.

Styling the Table

The Style tab exposes native Elementor group controls so the table inherits your design system. Available sections:

All style controls target TableCrafter's .tc-table, .tc-table-container, .tc-table th, and .tc-table td selectors scoped to the widget, so changes never leak to other tables on the page.

Because styling is applied through Elementor selectors rather than inline shortcode attributes, you can reuse Elementor global colors and fonts and keep the table on-brand across templates.

Equivalent Shortcode

On the frontend the widget assembles a standard shortcode from your settings. A widget configured with a JSON API, a nested root path, curated columns, search on, export on, 10 rows per page, and a default sort produces output equivalent to:

[tablecrafter source="https://api.example.com/data.json" root="data.results" include="name,email,date" search="true" filters="true" export="true" per_page="10" sort="name:asc"]

This means anything you can express in the widget is portable to a classic theme or template file. To reuse the same table outside Elementor, copy the equivalent shortcode or call it from PHP:

// In a template file
echo do_shortcode('[tablecrafter source="https://api.example.com/data.json" search="true"]');

Troubleshooting

Next, see shortcodes.html for the full [tablecrafter] attribute reference, or gutenberg-block.html if you are building on a block-based theme instead.