shadcn-templ

Switch

A control that allows the user to toggle between checked and not checked.

templ
templ SwitchDemo() {
	<div class="flex items-center space-x-2">
		@ui.Switch("airplane-mode", false, false, "", templ.Attributes{"id": "airplane-mode"})
		@ui.Label("", templ.Attributes{"for": "airplane-mode"}) {
			Airplane Mode
		}
	</div>
}