Renders an accessible label associated with controls.
package showcase import "github.com/axzilla/templui/pkg/components" templ CheckboxWithLabel() { <div class="flex items-center gap-2"> @components.Checkbox(components.CheckboxProps{ ID: "checkbox-with-label", }) @components.Label(components.LabelProps{ For: "checkbox-with-label", Text: "Accept terms and conditions", }) </div> }
The Label component enhances the following form controls: