TableTable Layout

Table Layout

Controls the table cell layout algorithm.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari
ClassStyle
tl-atable-layout: auto;
tl-ftable-layout: fixed;

Auto

Initial value

The browser will determine the column widths based on the content.

Full NamePhone Number
John Doe+1 (555) 123-4567
<table class="b-1 b-d bc-c tc-slate tl-auto w-full">
<thead>
<tr>
<th class="b-1 b-d bg-silver-2 bc-slate p-3 ta-c">Full Name</th>
<th class="b-1 b-d bg-silver-2 bc-slate p-3 ta-c">Phone Number</th>
</tr>
</thead>
<tbody>
<tr>
<td class="b-1 b-d bc-slate p-3 ta-c">John Doe</td>
<td class="b-1 b-d bc-slate p-3 ta-c">+1 (555) 123-4567</td>
</tr>
</tbody>
</table>

Fixed

The column widths are set by the width of the table and the first row.

Full NamePhone Number
John Doe+1 (555) 123-4567
<table class="b-1 b-d bc-c tc-slate tl-f w-full">
<thead>
<tr>
<th class="b-1 b-d bg-silver-2 bc-slate p-3 ta-c">Full Name</th>
<th class="b-1 b-d bg-silver-2 bc-slate p-3 ta-c">Phone Number</th>
</tr>
</thead>
<tbody>
<tr>
<td class="b-1 b-d bc-slate p-3 ta-c">John Doe</td>
<td class="b-1 b-d bc-slate p-3 ta-c">+1 (555) 123-4567</td>
</tr>
</tbody>
</table>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Targeting different viewports

You can combine responsive breakpoints like sm:tl-*, md:tl-*, lg:tl-*, and xxl:tl-* to allow targeting specific utilities in different viewports.

Targeting hover states

Alternatively, you can apply :hover by using h:tl-* utility to override elements and change their values when hovering over them.