intro
DataTable
A Concreto component for displaying tabular data.
DataTable
The DataTable component provides a rigid, predictable structure for tabular data. It embodies the Concreto aesthetic—sharp lines, high contrast text headers, and clear delineations—acting as the geometric scaffolding upon which data rests.
It supports variations like default, compact, and striped to handle different densities of information.
Demonstration
| Nome | Função | Cidade | Status |
|---|---|---|---|
| Lina Bo Bardi | Arquiteta | São Paulo | Ativo |
| Oscar Niemeyer | Arquiteto | Rio de Janeiro | Concluído |
| Athos Bulcão | Artista | Brasília | Pendente |
| Burle Marx | Paisagista | Rio de Janeiro | Cancelado |
Usage
<script> import { DataTable } from 'cobogo';
const headers = [ { key: 'name', label: 'Nome' }, { key: 'role', label: 'Função' }, { key: 'status', label: 'Status', align: 'center' } ];
const data = [ { name: 'Lina Bo Bardi', role: 'Arquiteta', status: 'Ativo' }, { name: 'Athos Bulcão', role: 'Artista', status: 'Concluído' } ];</script>
<DataTable {headers} {data} caption="Exemplo de Tabela" variant="striped" />Doctrine
The DataTable enforces order. It does not try to be playful or overly soft; its headers are uppercase, spaced out, and bold (var(--fg-heading) against var(--bg-sunken)), anchoring the columns. Status badges inside the table use our precise semantic tokens (var(--verde), var(--ocre)) without overwhelming the grid structure.