Responsive data-table layout with generated mobile cell labels.
Table colors
Set data-table to a semantic color token to apply that tone to the responsive table. Dragonglass supports primary, accent, success, info, warning, danger, and default.
Food details| Type of food | Calories | Average price |
|---|
| Slice of pizza | 450 | $5.00 |
| Hamburger | 350 | $3.50 |
<table data-table="primary">
<caption>Food details</caption>
<thead>
<tr>
<th scope="col">Type of food</th>
<th scope="col">Calories</th>
<th scope="col">Average price</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Type of food">Slice of pizza</td>
<td data-label="Calories">450</td>
<td data-label="Average price">$5.00</td>
</tr>
<tr>
<td data-label="Type of food">Hamburger</td>
<td data-label="Calories">350</td>
<td data-label="Average price">$3.50</td>
</tr>
</tbody>
</table>
Food details| Type of food | Calories | Average price |
|---|
| Slice of pizza | 450 | $5.00 |
| Hamburger | 350 | $3.50 |
<table data-table="accent">
<caption>Food details</caption>
<thead>
<tr>
<th scope="col">Type of food</th>
<th scope="col">Calories</th>
<th scope="col">Average price</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Type of food">Slice of pizza</td>
<td data-label="Calories">450</td>
<td data-label="Average price">$5.00</td>
</tr>
<tr>
<td data-label="Type of food">Hamburger</td>
<td data-label="Calories">350</td>
<td data-label="Average price">$3.50</td>
</tr>
</tbody>
</table>
Food details| Type of food | Calories | Average price |
|---|
| Slice of pizza | 450 | $5.00 |
| Hamburger | 350 | $3.50 |
<table data-table="success">
<caption>Food details</caption>
<thead>
<tr>
<th scope="col">Type of food</th>
<th scope="col">Calories</th>
<th scope="col">Average price</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Type of food">Slice of pizza</td>
<td data-label="Calories">450</td>
<td data-label="Average price">$5.00</td>
</tr>
<tr>
<td data-label="Type of food">Hamburger</td>
<td data-label="Calories">350</td>
<td data-label="Average price">$3.50</td>
</tr>
</tbody>
</table>
Food details| Type of food | Calories | Average price |
|---|
| Slice of pizza | 450 | $5.00 |
| Hamburger | 350 | $3.50 |
<table data-table="info">
<caption>Food details</caption>
<thead>
<tr>
<th scope="col">Type of food</th>
<th scope="col">Calories</th>
<th scope="col">Average price</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Type of food">Slice of pizza</td>
<td data-label="Calories">450</td>
<td data-label="Average price">$5.00</td>
</tr>
<tr>
<td data-label="Type of food">Hamburger</td>
<td data-label="Calories">350</td>
<td data-label="Average price">$3.50</td>
</tr>
</tbody>
</table>
Food details| Type of food | Calories | Average price |
|---|
| Slice of pizza | 450 | $5.00 |
| Hamburger | 350 | $3.50 |
<table data-table="warning">
<caption>Food details</caption>
<thead>
<tr>
<th scope="col">Type of food</th>
<th scope="col">Calories</th>
<th scope="col">Average price</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Type of food">Slice of pizza</td>
<td data-label="Calories">450</td>
<td data-label="Average price">$5.00</td>
</tr>
<tr>
<td data-label="Type of food">Hamburger</td>
<td data-label="Calories">350</td>
<td data-label="Average price">$3.50</td>
</tr>
</tbody>
</table>
Food details| Type of food | Calories | Average price |
|---|
| Slice of pizza | 450 | $5.00 |
| Hamburger | 350 | $3.50 |
<table data-table="danger">
<caption>Food details</caption>
<thead>
<tr>
<th scope="col">Type of food</th>
<th scope="col">Calories</th>
<th scope="col">Average price</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Type of food">Slice of pizza</td>
<td data-label="Calories">450</td>
<td data-label="Average price">$5.00</td>
</tr>
<tr>
<td data-label="Type of food">Hamburger</td>
<td data-label="Calories">350</td>
<td data-label="Average price">$3.50</td>
</tr>
</tbody>
</table>
Food details| Type of food | Calories | Average price |
|---|
| Slice of pizza | 450 | $5.00 |
| Hamburger | 350 | $3.50 |
<table data-table="default">
<caption>Food details</caption>
<thead>
<tr>
<th scope="col">Type of food</th>
<th scope="col">Calories</th>
<th scope="col">Average price</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Type of food">Slice of pizza</td>
<td data-label="Calories">450</td>
<td data-label="Average price">$5.00</td>
</tr>
<tr>
<td data-label="Type of food">Hamburger</td>
<td data-label="Calories">350</td>
<td data-label="Average price">$3.50</td>
</tr>
</tbody>
</table>