Open this example in the interactive library
Source code
<label class="demo has-checked:bg-emerald-200"
><input type="checkbox" /> Receive updates</label
>
Style a container with a checked child with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<label class="demo has-checked:bg-emerald-200"
><input type="checkbox" /> Receive updates</label
>