Table

ic.Table is a data table for displaying and interacting with structured data. It renders rows from a MATLAB table and gives you full control over column types, sorting, filtering, inline editing, row selection, and pinned columns. Columns are defined using typed subclasses of ic.table.Column, each tailored to a specific data type (text, numbers, booleans, dates, enums, progress bars, ratings, sparklines, images, colors, and action buttons).

Size, striping, and selection

Size controls the row height and font scaling: sm (24px), md (28px, the default), and lg (36px). Striped alternates row backgrounds for readability. Setting Selectable to true enables interactive selection: click a row number to select a row, a header to select a column, or a cell for cell selection. Shift-click adds to the selection. The Selection property is a struct with a type field ("none", "row", "column", or "cell") and a value containing the selected items.

Controls
No selection
#
Fruit
Price ($)
In Stock
Category
No data

Column types

Every column in a Table is defined by an ic.table.Column subclass. When you assign a MATLAB table to Data without specifying Columns, the framework auto-infers column types from your data (numeric becomes NumberColumn, logical becomes BooleanColumn, datetime becomes DateColumn, everything else becomes TextColumn). For finer control, create column objects explicitly. Each type has its own configuration properties on top of the shared ones (Field, Header, Width, Sortable, Filterable, Resizable, Align, Pinned, Visible, Editable).

TextColumn

Placeholder shows ghost text in empty cells. RichText enables bold and italic markdown parsing. Transform applies CSS text-transform ("uppercase", "lowercase", "capitalize"). Toggle Editable below to try inline text editing (double-click a cell).

Controls
Name
Email
No data

NumberColumn

Decimals sets fixed decimal places (-1 = auto). Prefix and Suffix wrap the formatted value (e.g. ”$” or ”%”). ThousandsSeparator adds comma grouping. Numbers also support ColorRules for conditional background coloring.

Controls
Product
Price
Qty
No data

BooleanColumn

DisplayMode controls rendering: "checkbox" (default), "text" (true/false), or "numeric" (1/0). When editable, a single click toggles the value (no double-click needed). Supports ColorRules (true = 1, false = 0).

Controls
Feature
Enabled
No data

EnumColumn

Items defines the set of allowed values. Colors assigns a hex color per item (must match Items length or be empty). Values render as colored tag pills. Sorting uses ordinal position in Items rather than alphabetical order.

Controls
Task
Status
No data

DateColumn

Format selects a display preset: "short", "long", "numeric", "iso", "datetime", or "time". Filtering uses date-range inputs. Supports ColorRules.

Controls
Event
Date
No data

ProgressBarColumn

Renders an inline progress bar. Min / Max define the value range. ShowLabel displays the formatted value next to the bar, with LabelFormat as a sprintf pattern (e.g. "%d%%"). Variant sets the bar color ("primary", "secondary", "success", "warning", "destructive"). Supports ColorRules for conditional bar color.

Controls
Task
Progress
No data

RatingColumn

MaxStars sets the scale (default 5). AllowHalf enables half-star increments. Color sets the filled star color as a hex value. When editable, users can click to set a rating. Supports ColorRules for conditional background color.

Controls
Movie
Rating
No data

SparklineColumn

Renders a mini line chart from a numeric vector per row. LineWidth, FillArea, and ShowEndDot control the line appearance. ShowLabel with Metric ("total" for the last value, "relative" for percentage change) adds a value beside the chart. Variant and ColorRules control color.

Sensor
Trend (7d)
No data

ColorColumn

Renders color swatches. Format sets the output format ("hex", "rgb", "hsl"). ShowAlpha enables an alpha channel slider. Presets provides quick-pick color swatches. When editable, double-click opens a full color picker.

Controls
Name
Color
No data

ButtonColumn

Buttons is an array of ic.table.CellButton objects. Each button has a Key (identifier passed to the callback), Label, Icon, Tooltip, Variant ("default", "primary", "destructive"), and Disabled. Clicks invoke the column’s OnCellAction callback with the button’s Key. Button columns are always non-sortable and non-filterable.

Name
Actions
No data

ImageColumn

Displays thumbnails from ic.Asset values (file paths or URLs). PopupWidth / PopupHeight control the hover preview size. ObjectFit sets the CSS fit ("contain", "cover", "fill", etc.). Hover over a thumbnail to see the full-size popup.

Pokemon
Sprite
No data

Sorting and filtering

Columns with Sortable = true show a sort indicator in the header. Clicking cycles through ascending, descending, and no sort. Columns with Filterable = true show a filter icon that opens a type-appropriate filter popup: text columns get a substring search, number and date columns get min/max range inputs, boolean columns get a toggle, and enum columns get a checkbox list. Table handles sorting and filtering entirely on the client side.

Name
Age
Department
No data

Pinned columns

Pinned on a column definition locks it to the left or right edge so it stays visible during horizontal scrolling. Useful for identifier columns (like an ID or name) that should always remain in view. Resize the playground below to see the pinned columns stick while the middle columns scroll.

ID
Name
Role
Team
Location
Start Year
No data

Color rules

Number, date, boolean, rating, progress bar, and sparkline columns support ColorRules, an array of ic.table.ColorRule objects. Each rule has an Operator (">", ">=", "<", "<=", "==", "~=", "between"), a Value (scalar or [lo hi] for “between”), and a Color (hex). Rules are evaluated in order: the first match sets the cell background color.

Metric
Value (%)
No data

Context menu

Columns can have a ContextMenu property, an array of ic.menu.Entry objects that appears on right-click. Entries can be items (clickable actions), separators, or folders (submenus with nested children). When the user picks an action, the ContextMenuAction event fires with the item’s Key, the column field, and the 1-based row index. Right-click on the “File” column below to try it.

File
Size
Modified
No data
Events
No events fired yet

Events

Table fires several events for user interactions. CellClicked and RowClicked fire on every click with the cell value and row data. SelectionChanged fires when the selection state changes. SortChanged and FilterChanged fire when the user interacts with column headers. CellEdited fires after an inline edit is committed, carrying the old and new values. ColumnResized fires after a column resize drag ends.

#
Fruit
Price ($)
In Stock
Category
No data
Events
No events fired yet

Programmatic control

Table exposes methods for programmatic interaction. clearSelection() resets the selection. scrollToRow(index) scrolls to a specific row. focusCell(rowIndex, field) scrolls to and highlights a specific cell. removeRow(index) and removeColumn(field) modify the data, and editCell(rowIndex, field, value) updates a cell value from MATLAB.

Avoid reassigning Data for small changes. Setting tbl.Data = ... serializes the entire table and flushes it to the frontend, which clears the current selection and re-renders every row. For updating individual values, use tbl.editCell(row, field, value, ...) instead: it sends only the changed cells as a lightweight patch, preserves selection state, and is significantly faster on large tables. Reserve full Data reassignment for when the dataset itself changes (new rows, different structure).
#
Fruit
Price ($)
In Stock
Category
No data

Custom styling

Every component exposes a .css property for instance-level CSS overrides from MATLAB. This example shows a dark-mode look.

#
Fruit
Price ($)
In Stock
Category
No data
tbl = ic.Table("Data", data, "Columns", cols);

% Dark trading-terminal theme
tbl.css.style(".ic-tbl", ...
    "background", "#0a0a0f", ...
    "border_color", "#1e293b");

tbl.css.style(".ic-tbl__header", ...
    "background_color", "#0d0e14", ...
    "box_shadow", "inset 0 -2px 0 #3b82f6");

tbl.css.style(".ic-tbl__hcell", ...
    "color", "#94a3b8", ...
    "text_transform", "uppercase", ...
    "letter_spacing", "0.06em", ...
    "font_size", "0.6rem");

tbl.css.style(".ic-tbl__cell", ...
    "color", "#e2e8f0", ...
    "border_color", "#1e293b");

tbl.css.style(".ic-tbl__cell--rownum", ...
    "color", "#475569", ...
    "background", "#080810", ...
    "border_color", "#1e293b");

tbl.css.style(".ic-tbl__row:hover", ...
    "background_color", "rgba(59,130,246,0.06)");

tbl.css.style(".ic-tbl__row--striped", ...
    "background_color", "rgba(255,255,255,0.015)");

tbl.css.style(".ic-tbl__row--selected", ...
    "background_color", "rgba(59,130,246,0.12)", ...
    "box_shadow", "inset 3px 0 0 #3b82f6");
Compatibility note. Figures run in different browsers depending on Matlabs version and operating system. CSS features like linear-gradient, backdrop-filter, or newer color functions may not work everywhere. For reference, MATLAB R2024b uses Chromium 104. Always test your custom styles in the MATLAB version you are targeting, and use canIuse to check compatibility of specific CSS features if you know the browser version MATLAB is using. Use the Developer Tools component to inspect the DOM structure of each component and find the right selectors for styling.