A collection of form components and helper utilities for building accessible forms.
Enter your email address for notifications.
Please enter a valid email address
package showcase import "github.com/axzilla/templui/pkg/components" templ InputForm() { <div class="w-full max-w-sm"> @components.FormItem(components.FormItemProps{}) { @components.FormLabel(components.FormLabelProps{ Text: "Email", For: "email-form", }) @components.Input(components.InputProps{ ID: "email-form", Type: "email", Name: "email", Placeholder: "m@example.com", HasError: true, }) @components.FormDescription(components.FormDescriptionProps{}) { Enter your email address for notifications. } @components.FormMessage(components.FormMessageProps{ Message: "Please enter a valid email address", Type: "error", }) } </div> }
Form elements are composed using a set of helper components that enhance the following form controls: