
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
control-tower-table
Advanced tools
A flexible, JSON-driven, rule-based React table component for operational dashboards. Built with MUI DataGrid, supports dynamic styling and actions via simple rule definitions.
A flexible, JSON-driven, rule-based React table component for operational dashboards. Built with MUI DataGrid, supports dynamic styling and actions via simple rule definitions.
npm install control-tower-table
# or
yarn add control-tower-table
Peer dependencies:
You must also install these if not already present in your project:
npm install @mui/material @mui/x-data-grid @emotion/react @emotion/styled sass
import { ControlTowerTable, Rule } from 'control-tower-table';
import 'control-tower-table/dist/style.css'; // or .scss if you publish SCSS
import { GridColDef, GridRowsProp } from '@mui/x-data-grid';
const columns: GridColDef[] = [
{ field: 'id', headerName: 'ID', width: 90 },
{ field: 'name', headerName: 'Name', width: 150 },
{ field: 'status', headerName: 'Status', width: 120 },
];
const rows: GridRowsProp = [
{ id: 1, name: 'Order #1001', status: 'Pending' },
{ id: 2, name: 'Order #1002', status: 'Shipped' },
{ id: 3, name: 'Order #1003', status: 'Delivered' },
];
const rules: Rule[] = [
{
id: 'pending-warning',
condition: { key: 'status', operator: 'eq', value: 'Pending' },
style: {
rowClass: 'warning', // Use built-in style
},
},
{
id: 'custom-row',
condition: { key: 'status', operator: 'eq', value: 'Shipped' },
style: {
rowClass: 'my-special-row', // Use your own custom class
},
},
{
id: 'multiple-classes',
condition: { key: 'status', operator: 'eq', value: 'Delivered' },
style: {
rowClass: 'success my-special-row', // Both built-in and custom
},
},
];
<ControlTowerTable
rows={rows}
columns={columns}
rules={rules}
/>
rowClass: 'error', rowClass: 'warning', rowClass: 'success', rowClass: 'alert', or rowClass: 'info' to get the default styles (see below).rowClass: 'my-special-row'). Define your own CSS for these.rowClass: 'warning my-special-row'). Both will be applied.ct-row-errorct-row-warningct-row-successct-row-alertct-row-infoThese are mapped from the keys above and are already styled in your SCSS.
type Rule = {
id: string;
condition: Condition;
style?: {
rowClass?: string; // Built-in key, custom class, or both (space-separated)
icon?: string;
cellClassMap?: Record<string, string>;
cellStyleMap?: Record<string, React.CSSProperties>;
};
action?: {
type: 'modal' | 'link' | 'callback';
label?: string;
payload?: any;
callback?: (row: any, action: any) => void;
};
};
The following row classes are available by default:
ct-row-errorct-row-warningct-row-successct-row-alertct-row-infoYou can also define custom cell classes (e.g., highlight-cell).
To override or extend styles, import your own CSS/SCSS after the package styles.
import { ControlTowerTable, Rule } from 'control-tower-table';
import 'control-tower-table/dist/style.css';
const columns = [/* ... */];
const rows = [/* ... */];
const rules: Rule[] = [/* ... */];
<ControlTowerTable rows={rows} columns={columns} rules={rules} />;
MIT
Note:
FAQs
A flexible, JSON-driven, rule-based React table component for operational dashboards. Built with MUI DataGrid, supports dynamic styling and actions via simple rule definitions.
The npm package control-tower-table receives a total of 6 weekly downloads. As such, control-tower-table popularity was classified as not popular.
We found that control-tower-table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.