Forms
Switch
A checkbox presented as a labeled switch.
components.Switch · SwitchProps
Preview
Open standalone preview →Use it well.
It submits like a checkbox. Use for a boolean choice; this preview is not wired to a saved preference.
Explore the full demo →Templ example
Download example.templThis is the source compiled for the preview. Select the text to copy it, or download the file. Change the package name and demo routes for your application.
package examples
import "github.com/Tend-Stack/GothUI/v2026/components"
templ ExampleSwitch() {
@components.Switch(components.SwitchProps{ID: "sample-digest", Name: "digest", Label: "Include a weekly digest"})
}