Dev Helpers
← Back

Build responsive auto-fit tracks

Build responsive auto-fit tracks with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<div
  class="demo grid grid-cols-[repeat(auto-fit,minmax(min(100%,6rem),1fr))] gap-2"
>
  <span class="tile">One</span><span class="tile">Two</span
  ><span class="tile">Three</span>
</div>