Open this example in the interactive library
Source code
<nav
class="demo [&_[aria-current=page]]:underline [&_[aria-current=page]]:font-bold"
aria-label="Product"
>
<span>Home</span> · <span aria-current="page">Library</span>
</nav>
Emphasize the current navigation item with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<nav
class="demo [&_[aria-current=page]]:underline [&_[aria-current=page]]:font-bold"
aria-label="Product"
>
<span>Home</span> · <span aria-current="page">Library</span>
</nav>