Table, Bro is the Custom Element ‹table-bro›: it takes the columns, the rows and a config with the name of its skin, and renders the table with its toolbar and its paginator. A page in Vanilla JS creates the element and gives it the three, orders.ts:
import type {BroCol, BroConfig, BroRow} from '@table-bro/core';
interface Order extends BroRow {
description: string;
price: number;
}
const cols: BroCol<Order>[] = [
{
title: 'Description',
name: 'description'
}, {
title: 'Price',
name: 'price',
dataType: 'number',
className: 'bro-col_text-right'
}
];
const rows: Order[] = [
{
description: 'Modern Cotton Chair',
price: 100
}, {
description: 'Awesome Concrete Ball',
price: 200
}
];
const conf: BroConfig = {
skin: 'bs', // 'nv' for Vanilla HTML
toolbarTitle: 'Orders'
};
const table = document.createElement('table-bro');
table.id = 'orders';
table.configure({cols, rows, conf});
// The shadows of the table fall into the margins of this element: the visible table takes its full width
const container = document.createElement('div');
container.className = 'bro-table-shadow-container';
container.append(table);
document.body.append(container);
|
|
The quickest start is the MCP server of Table, Bro: add it to your AI coding agent and describe the table you need. The agent installs the packages, generates the table, its setup and its cells, and checks the result. For Claude Code, in the root of the project:
claude mcp add --scope project table-bro -- npx -y @table-bro/mcp@1.3.0
MCP server gives the setup for Codex, Cursor, VS Code and Claude Desktop.
Table, Bro is a table engine, and a skin gives it the look and the controls of a UI library: Angular Material for Angular apps, React MUI for React and Preact, Solid SUID for Solid, Svelte M3 for Svelte, Vue Vuetify for Vue, and for any page Vanilla Bootstrap, on Bootstrap 5, and Vanilla HTML, plain HTML elements, the reference skin to start your own from. The goal is any framework with any UI components: a skin of your design system, or of the component library of your framework, is built the same way, as Create your own skin below shows. The command installs the table and its skin; the page of the framework gives the whole setup, step by step, with a working page.
| Framework | Skin | Install | Page |
|---|---|---|---|
| Angular | Angular Material, mat | npm install @table-bro/core @table-bro/angular @table-bro/angular-material @angular/elements | Angular data table |
| React and Preact | React MUI, mui | npm install @table-bro/core @table-bro/react-mui @mui/material @emotion/react @emotion/styled | React data table, Preact data table |
| Solid | Solid SUID, suid | npm install @table-bro/core @table-bro/solid-suid @suid/material | Solid data table |
| Svelte | Svelte M3, m3-svelte | npm install @table-bro/core @table-bro/svelte-m3 m3-svelte vite-plugin-functions-mixins | Svelte data table |
| Vue | Vue Vuetify, vuetify | npm install @table-bro/core @table-bro/vue-vuetify vuetify | Vue 3 data table |
| Vanilla JS | Vanilla Bootstrap, bs | npm install @table-bro/core @table-bro/bootstrap bootstrap @types/bootstrap | Vanilla JS data table |
| Vanilla JS | Vanilla HTML, nv | npm install @table-bro/core @table-bro/native | Vanilla JS data table |
The skins Vanilla Bootstrap and Vanilla HTML work in every framework: install them as on Vanilla JS data table. In Angular they render through the component table-bro-ng, and Angular data table shows their setup.
A skin gives the table the look and the controls of a UI library, and a skin of your design system, or of the component library of your framework, is built as the shipped skins are. It is a config, BroSkinConfig, which registerSkin(name, config) of @table-bro/core registers once, before the tables, and conf.skin of a table names: the classes of the parts of the table in css, the Custom Elements of its controls in components, each by its selector, the attribute of the color mode of your UI library in themeAttribute and the definition of its elements in defineElements.
Start from Vanilla HTML, nv: give its config nativeSkinConfig of @table-bro/native the classes of your design system, or replace its elements with Custom Elements of your UI components, and register it under a name of its own, as registerSkin('brand', brandSkinConfig) and conf: {skin: 'brand'}. An AI coding agent builds a skin of the components of your library with the skill create-skin of the repository, whose reference is React MUI, mui. Your own skin describes the config, the elements, the styles, the registration and the server render of a skin.
We use Google Analytics to understand how you use our site and to make it better.
Learn more in our Privacy Policy