templUI Pro coming soon  

50% OFF Join Waitlist

Form

A collection of form components and helper utilities for building accessible forms.

Source
TailwindCSS

Enter your email address for notifications.

Please enter a valid email address

Installation

templui add form

Usage

Form elements are composed using a set of helper components that enhance the following form controls:

API Reference

Required parameter
Hover for description

Item

Container for form fields with vertical spacing layout.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-

ItemFlex

Container for form fields with horizontal flex layout (for inline forms).

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-

Label

Label element for form controls with proper accessibility association.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
For
string
-
DisabledClass
string
-

Description

Descriptive text to provide additional context for form fields.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-

Message

Message text for displaying validation errors or informational messages.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
Variant
MessageVariant
-