Open this example in the interactive library
Source code
<style>
.demo:focus-within {
background-color: #bfdbfe;
}
</style>
<label class="demo">Project name <input type="text" /></label>
Highlight a field group on focus with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo:focus-within {
background-color: #bfdbfe;
}
</style>
<label class="demo">Project name <input type="text" /></label>