Skip to content

Datagrid

A responsive grid of title and value pairs: the details of a server, an invoice, a user.

When the value is more than a string, compose the item with Datagrid:Item:Title and Datagrid:Item:Content. Both forms mix freely in the same grid:

Datagrid:Item has a block per prop. Override body to keep the title prop and render a custom value:

The grid fits as many columns as the width allows. horizontal puts each title beside its value, one pair per row (datagrid-horizontal), for a narrow detail panel. Requires Tabler 1.7+:

cols sets a fixed number of columns, from 1 to 4 (datagrid-cols-{n}, Tabler 1.7+):

Prop Type Default Description
horizontal bool false Title beside the value, one pair per row (datagrid-horizontal)
cols int? null Fixed number of columns, 1 to 4 (datagrid-cols-{n}); unset, as many as fit

Other attributes go to the root <div class="datagrid">.

Datagrid:Item:

Prop Type Default Description
title string? null Rendered with Datagrid:Item:Title
text string? null Rendered with Datagrid:Item:Content

Other attributes go to the <div class="datagrid-item">.

Component Renders
Datagrid:Item <div class="datagrid-item">, one pair
Datagrid:Item:Title <div class="datagrid-title">
Datagrid:Item:Content <div class="datagrid-content">

Blocks of Datagrid:Item:

Block Default
title Datagrid:Item:Title with the title prop, when set
body Datagrid:Item:Content with the text prop, when set
content title and body: replace it to compose freely