Form
A collection of form components and helper utilities for building accessible forms.
Enter your email address for notifications.
Please enter a valid email address
Installation
templui add formUsage
Form elements are composed using a set of helper components that enhance the following form controls:
API Reference
Item
Container for form fields with vertical spacing layout.
| Name | Type | Default |
|---|---|---|
Unique identifier for the form item container. | | - |
Additional CSS classes to apply to the form item. | | - |
Additional HTML attributes to apply to the form item element. | | - |
ItemFlex
Container for form fields with horizontal flex layout (for inline forms).
| Name | Type | Default |
|---|---|---|
Unique identifier for the flex form item container. | | - |
Additional CSS classes to apply to the flex form item. | | - |
Additional HTML attributes to apply to the flex form item element. | | - |
Label
Label element for form controls with proper accessibility association.
| Name | Type | Default |
|---|---|---|
Unique identifier for the label element. | | - |
Additional CSS classes to apply to the label. | | - |
Additional HTML attributes to apply to the label element. | | - |
ID of the form control this label is associated with. | | - |
Additional CSS classes to apply when the associated control is disabled. | | - |
Description
Descriptive text to provide additional context for form fields.
| Name | Type | Default |
|---|---|---|
Unique identifier for the description element. | | - |
Additional CSS classes to apply to the description text. | | - |
Additional HTML attributes to apply to the description element. | | - |
Message
Message text for displaying validation errors or informational messages.
| Name | Type | Default |
|---|---|---|
Unique identifier for the message element. | | - |
Additional CSS classes to apply to the message text. | | - |
Additional HTML attributes to apply to the message element. | | - |
Message type that determines styling. Options: 'error', 'info'. | | - |