Dev Helpers
← Back

Float a label alongside copy

Float a label alongside copy with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<div class="demo [&_.tile]:float-left [&_.tile]:mr-3">
  <span class="tile">Tip</span>Text flows beside the floated label and resumes
  across the full width below it.
</div>