HasInputMode
API reference › HTML Attribute › Global › HasInputMode
Used by 1 type
Provides an immutable API for the inputmode attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
inputMode() | Sets the inputmode attribute. | HasInputMode |
Method details
Section titled “Method details”inputMode()
Section titled “inputMode() ”public function inputMode(string|UnitEnum|null $value): staticSets the inputmode attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|UnitEnum| | Input mode value (‘decimal’, ‘email’, ‘none’, ‘numeric’, ‘search’, ‘tel’, ‘text’, ‘url’, or null to remove the attribute). |
Returns
static: New instance with the updated inputmode attribute.
Throws
InvalidArgumentException: If the provided value is not valid.