Pages · Laravilt
TextInput
Single-line text input with types, affixes, masks and a character counter.
A single-line text input. It supports the text, email, password, tel, url and search types.
Basic usage
php
Input types
php
email() and url() also add the matching validation rule.
Prefix and suffix
php
Icons are Lucide icon names.
Length and counter
php
Masks and patterns
php
API reference
| Method | Description |
|---|---|
type(string) | Set the HTML input type |
email() / password() / tel() / url() / search() | Type shortcuts |
revealable(bool) | Show or hide toggle for passwords |
prefix(string) / suffix(string) | Text affixes |
prefixIcon(string) / suffixIcon(string) | Icon affixes |
minLength(int) / maxLength(int) | Length limits (also validated) |
characterCount(bool) | Show a character counter |
mask(string) | Input mask |
pattern(string) | HTML pattern attribute |
step(int|float) | Step for numeric types |