Dev Helpers
← Back

Let columns size from the declared table width

Let columns size from the declared table width with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<table class="demo w-full table-fixed [&_td]:truncate">
  <caption>
    Fixed layout
  </caption>
  <tbody>
    <tr>
      <td>Short</td>
      <td>
        An intentionally long table cell that can truncate at narrow widths
      </td>
    </tr>
  </tbody>
</table>