Open this example in the interactive library
Source code
<input
class="demo out-of-range:outline-2 out-of-range:outline-red-700"
type="number"
min="1"
max="5"
value="8"
aria-label="Copies from one to five"
/>
Invalid range visual cue with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<input
class="demo out-of-range:outline-2 out-of-range:outline-red-700"
type="number"
min="1"
max="5"
value="8"
aria-label="Copies from one to five"
/>