Eight production-ready data table designs using the same Databoard datatable contract. Data stays JSON, behavior comes from antsand-v2.js, and the visual system changes through the table variant class.
body[0].datatable provides rows; body[0].datatable_config.data_field defines columns; and datatable_config selects the Sass v2 variant, search, and pagination. The generated controls are styled by components/_tables.scss.A table can come from JSON, a database query, or an API endpoint. Antsand only needs a predictable row array plus metadata that explains labels, types, order, and behavior.
The renderer then turns that contract into the selected Sass v2 table variant.
Rows are plain objects. They can be authored as JSON, loaded from Mongo/MySQL, or returned by an endpoint.
{
"datatable": [
{"name":"Sarah Chen","role":"Senior Engineer","status":"Active"},
{"name":"Aisha Patel","role":"UX Designer","status":"Pending"},
{"name":"Tom Anderson","role":"Frontend Dev","status":"Inactive"}
]
}
For the generated static renderer, put column labels, visibility, order, and formatting in datatable_config.data_field. The older datatable_columns field is not read by this renderer.
{
"datatable_config": {
"data_field": [
{"name":"name", "rename":"Name", "visible":true, "order":1},
{"name":"role", "rename":"Role", "visible":true, "order":2},
{"name":"status", "rename":"Status", "type":"status", "visible":true, "order":3}
]
}
}
The same rows can become material, glass, neon, striped, or corporate by changing the variant.
{
"datatable_config": {
"mode": "static",
"variant": "material",
"searchable": true,
"pagination": true,
"per_page": 5
}
}
A controller can fetch records from storage, normalize field names, and pass the same row array into datatable.
$rows = $orders->find(['status' => 'paid'])->toArray();
$api_data['body'][]['datatable'] = array_map(function ($row) {
return [
'customer' => $row['customer_name'],
'total' => $row['total'],
'status' => $row['status']
];
}, $rows);
The page section maps its api_data destination to a real menu/data source. The deployment renderer does not guess; it receives resolved data.
{
"data_mapping": {
"api_data": [
["api_data"],
["databoard", "menu", "component_tables_material"]
]
}
}
Try searching the rows, changing the page size, or moving to page two. Sass v2 styles the controls; the table module filters and pages the same row data used by generated sites.
| Feature | Owner | Status |
|---|---|---|
| Search input | Sass v2 + table module | Ready |
| Pagination buttons | Sass v2 + table module | Ready |
| Page-size selector | Sass v2 + table module | Ready |
| Column sorting | Table module | Ready |
| Responsive rows | Sass v2 | Ready |
| Row data mapping | Databoard | Ready |
| Column labels | Databoard | Ready |
| Date formatting | Table renderer | Ready |
| Keyboard focus | Sass v2 | Ready |
| Theme variant | Sass v2 | Ready |
| Generated site | Antsand | Ready |
| Documentation preview | StylesDoc | Ready |
{
"body": [{
"datatable": [{"feature": "Search input", "layer": "Sass v2", "status": "Ready"}],
"datatable_config": {
"mode": "static",
"variant": "elegant",
"searchable": true,
"pagination": true,
"per_page": 5,
"data_field": [{"name": "feature", "rename": "Feature", "visible": true, "order": 1}]
}
}]
}
Elevated card, subtle shadow, soft header gradient, and status badges. Use this for product dashboards and admin screens.
| Name | Role | Department | Start Date | Status |
|---|---|---|---|---|
| Sarah Chen | Senior Engineer | Platform | Mar 15, 2022 | Active |
| Marcus Johnson | Product Manager | Growth | Aug 1, 2021 | Active |
| Aisha Patel | UX Designer | Design | Jan 10, 2023 | Pending |
| James Wilson | DevOps Lead | Infrastructure | Nov 22, 2020 | Active |
| Elena Rodriguez | Data Scientist | AI/ML | Jun 5, 2023 | Active |
| Tom Anderson | Frontend Dev | Platform | Sep 20, 2022 | Inactive |
{
"body": [{
"datatable": [{"name":"Sarah Chen","status":"Active"}],
"datatable_config": {"variant":"material","searchable":true,"pagination":true}
}]
}
Borderless and content-first. Good for docs, package lists, and pages where the table should not dominate the layout.
| Package | Version | Downloads | Size Kb | License |
|---|---|---|---|---|
| @antsand/core | 4.2.1 | 1245890 | 42 | MIT |
| @antsand/cli | 3.8.0 | 892340 | 18 | MIT |
| @antsand/forms | 2.1.4 | 567120 | 35 | MIT |
| @antsand/deploy | 1.5.2 | 423780 | 28 | Apache-2.0 |
| @antsand/tables | 1.0.0 | 89450 | 14 | MIT |
<div class="ant-table minimal responsive" data-ant-table>...</div>
Purple gradient header and alternating row tint for polished dashboards and project management views.
| Project | Client | Budget | Progress | Deadline |
|---|---|---|---|---|
| Website Redesign | Acme Corp | 48000 | 87% | 2026-06-15 |
| Mobile App v2 | TechStart | 125000 | 42% | 2026-09-01 |
| API Platform | DataFlow | 92500 | 95% | 2026-05-30 |
| E-commerce Suite | ShopMax | 67000 | 23% | 2026-11-20 |
<div class="ant-table elegant responsive" data-ant-table>...</div>
Frosted table surface for gradient or image-backed sections. The wrapper provides the background; the table remains standard data.
| Event | Location | Event Date | Attendees | Type |
|---|---|---|---|---|
| AI Summit 2026 | San Francisco | Jun 12, 2026 | 2400 | Conference |
| Design Systems Live | Toronto | Jul 8, 2026 | 850 | Workshop |
| Open Source Week | Berlin | Sep 21, 2026 | 5200 | Festival |
| Phalcon Camp | Vancouver | Oct 2, 2026 | 430 | Meetup |
<div class="ant-table glass responsive" data-ant-table>...</div>
High-contrast cyberpunk surface for monitoring, gaming, and experimental dashboards.
| Node | Region | Load | Latency | Status |
|---|---|---|---|---|
| edge-01 | us-west | 72% | 18ms | Active |
| edge-02 | us-east | 34% | 23ms | Active |
| core-01 | eu-central | 89% | 41ms | Pending |
| gpu-07 | ca-west | 96% | 12ms | Active |
<div class="ant-table neon responsive" data-ant-table>...</div>
Classic alternating rows with color theme modifiers. The demo uses the blue modifier.
| Invoice | Customer | Amount | Due Date | Status |
|---|---|---|---|---|
| INV-1001 | Northwind | 1240 | Jun 1, 2026 | Active |
| INV-1002 | Acme Corp | 2840 | Jun 8, 2026 | Pending |
| INV-1003 | Globex | 980 | Jun 13, 2026 | Active |
| INV-1004 | Initech | 4300 | Jun 18, 2026 | Inactive |
<div class="ant-table striped blue">...</div>
<div class="ant-table striped green">...</div>
<div class="ant-table striped purple">...</div>
Bolder row contrast for dense data. The demo uses the royal modifier.
| Rank | Product | Sales | Growth | Segment |
|---|---|---|---|---|
| 1 | ANTSAND Pro | 24890 | 18% | SaaS |
| 2 | Forms Engine | 16320 | 11% | Workflow |
| 3 | Databoard API | 9840 | 34% | Platform |
| 4 | Styles v2 | 7310 | 26% | CSS |
<div class="ant-table zebra ocean">...</div>
<div class="ant-table zebra forest">...</div>
<div class="ant-table zebra royal">...</div>
Navy business table with precise lines, compact cells, and executive-dashboard tone.
| Account | Owner | Value | Stage | Close Date |
|---|---|---|---|---|
| Enterprise North | R. Moore | 245000 | Approved | Jun 30, 2026 |
| West Coast Labs | S. Chen | 98000 | Pending | Jul 10, 2026 |
| DataFlow Inc | M. Johnson | 312000 | Active | Aug 1, 2026 |
| Civic Systems | A. Patel | 76000 | Rejected | Aug 18, 2026 |
<div class="ant-table corporate responsive" data-ant-table>...</div>