Bind a variable to the input's checked
And toggle through the button or a tag with onclick
let drawerState = $state(false)
<input id="navbar-drawer" type="checkbox" class="drawer-toggle" bind:checked={drawerState} />
<NavbarItem {name} {href} onclick={() => (drawerState = false)} />