Installation
Install the component
templui add inputAdd the JavaScript to your layout
@input.Script()Call this template in your base layout file (e.g., in the <head> section).
Examples
File
Disabled
With Label
Password
Time
Time (Styled)
Form
Enter your email address for notifications.
Please enter a valid email address
API Reference
Input
Text field that allows users to enter and edit values.
| Name | Type | Default |
|---|---|---|
Unique identifier for the input element. | | - |
Additional CSS classes to apply to the input. | | - |
Additional HTML attributes to apply to the input element. | | - |
Name attribute for the form input. | | - |
Input type. Options: 'text', 'password', 'email', 'number', 'tel', 'url', 'search', 'date', 'time', 'file'. | | |
Placeholder text to display when input is empty. | | - |
Current value of the input field. | | - |
Whether the input is disabled and non-interactive. | | |
Whether the input is read-only. | | |
Accepted file types for file inputs (e.g., '.jpg,.png'). | | - |
Whether the input has a validation error. | | |
Disable password visibility toggle for password inputs. | | |