Table Layout
Utilities for controlling table display, border behavior, and layout algorithm.
Usage
Border collapse
<!-- Collapsed: adjacent borders merge into single border -->
<table class="border-collapse border border-gray-400">
<thead>
<tr>
<th class="border border-gray-300 p-2">State</th>
<th class="border border-gray-300 p-2">City</th>
</tr>
</thead>
<tbody>
<tr>
<td class="border border-gray-300 p-2">Indiana</td>
<td class="border border-gray-300 p-2">Indianapolis</td>
</tr>
</tbody>
</table>
<!-- Separate: each cell has its own borders -->
<table class="border-separate border border-gray-400">...</table>Table layout
<!-- Auto: columns sized to content -->
<table class="table-auto">...</table>
<!-- Fixed: columns use first row widths -->
<table class="table-fixed">...</table>Table display (from layout-display)
Combine with table, table-row, table-cell, table-header-group, etc. for semantic table structure.
Responsive
<table class="border-collapse md:border-separate">...</table>Key Points
border-collapse- adjacent borders merge (single border between cells)border-separate- each cell displays its own borderstable-auto- column widths from contenttable-fixed- fixed layout; first row sets column widths- In v4,
border-*anddivide-*default tocurrentColor; specify a color (e.g.border-gray-200) explicitly