Open this example in the interactive library
Source code
<label
><input class="demo peer" type="checkbox" /> Advanced
<span class="details hidden peer-checked:block"
>Advanced options are available</span
></label
>
Show dependent fields when a choice is selected with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<label
><input class="demo peer" type="checkbox" /> Advanced
<span class="details hidden peer-checked:block"
>Advanced options are available</span
></label
>