InputRange
API reference › HTML › Form › InputRange
Renders the HTML <input type="range"> element.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/range.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$attributes protected | mixed[] | HTML attributes array used by the implementing class. Default: []. | UIAwesome\ |
$prefix protected | string | Prefix content string assigned to the element. Default: ''. | UIAwesome\ |
$prefixAttributes protected | array | HTML attributes array for the prefix element. Default: []. | UIAwesome\ |
$prefixTag protected | false|UnitEnum | Tag name for the prefix element, or false to disable. Default: false. | UIAwesome\ |
$suffix protected | string | Suffix content string assigned to the element. Default: ''. | UIAwesome\ |
$suffixAttributes protected | array | HTML attributes array for the suffix element. Default: []. | UIAwesome\ |
$suffixTag protected | false|UnitEnum | Tag name for the suffix element, or false to disable. Default: false. | UIAwesome\ |
$template protected | string | Template string used for constructing the HTML tag. Default: ''. | UIAwesome\ |
Methods
Section titled “Methods”Method details
Section titled “Method details”autocomplete()
Section titled “autocomplete() ”public function autocomplete(string|Stringable|UnitEnum|null $value): staticSets the autocomplete attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Autocomplete value, or null to remove the attribute. |
Returns
static: New instance with the updated autocomplete attribute.
list()
Section titled “list() ”public function list(string|Stringable|UnitEnum|null $value): staticSets the list attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Datalist ID, or null to remove the attribute. |
Returns
static: New instance with the updated list attribute.
max()
Section titled “max() ”public function max(float|int|string|Stringable|UnitEnum|null $value): staticSets the max attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float|Stringable|UnitEnum| | Maximum value, or null to remove the attribute. |
Returns
static: New instance with the updated max attribute.
min()
Section titled “min() ”public function min(float|int|string|Stringable|UnitEnum|null $value): staticSets the min attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float|Stringable|UnitEnum| | Minimum value, or null to remove the attribute. |
Returns
static: New instance with the updated min attribute.
step()
Section titled “step() ”public function step(float|int|string|Stringable|UnitEnum|null $value): staticSets the step attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float|Stringable|UnitEnum| | Step value. Use 'any' for no stepping restriction,null` to remove the attribute. |
Returns
static: New instance with the updated step attribute.
getTag()
Section titled “getTag() ”protected function getTag(): UIAwesome\Html\Interop\VoidsReturns the tag enumeration for the <input> element.
Returns
Voids: Tag enumeration instance for <input>.
loadDefault()
Section titled “loadDefault() ”protected function loadDefault(): array<string, mixed>Returns the default configuration for the input element.
Returns
array<string, mixed>: Default configuration for the input element, including the default type attribute set to range.
run()
Section titled “run() ”protected function run(): stringRenders the <input> element with its attributes.
Returns
string: Rendered HTML for the <input> element.