Dev Helpers
← Back

Allow an inner panel to scroll even with keyboard focus

Allow an inner panel to scroll even with keyboard focus with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<div
  class="demo max-h-24 overflow-y-auto focus-visible:outline-2 focus-visible:outline-blue-700"
  tabindex="0"
  role="region"
  aria-label="Release notes"
>
  <p style="height: 10rem">
    Focus this region and use Page Down or the arrow keys.
  </p>
</div>