Dev Helpers
← Back

Space separate table borders

Space separate table borders with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<table
  class="demo border-separate border-spacing-2 [&_td]:border [&_td]:border-slate-500 [&_td]:p-2"
>
  <caption>
    Weekly totals
  </caption>
  <tbody>
    <tr>
      <td>Monday</td>
      <td>14</td>
    </tr>
    <tr>
      <td>Tuesday</td>
      <td>7</td>
    </tr>
  </tbody>
</table>