Meter
API reference › HTML › Form › Meter
Renders the HTML <meter> element for scalar measurements within a known range, such as disk usage or the relevance
of a search result.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meter (BaseInline for the base implementation.).
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$attributes protected | mixed[] | HTML attributes array used by the implementing class. Default: []. | UIAwesome\ |
$content protected | string | Content string assigned to the element. 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”high()
Section titled “high() ”public function high(float|int|string|null $value): staticSets the high attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float| | Lower numeric bound of the high end of the measured range, or null to remove the attribute. |
Returns
static: New instance with the updated high attribute.
low()
Section titled “low() ”public function low(float|int|string|null $value): staticSets the low attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float| | Upper numeric bound of the low end of the measured range, or null to remove the attribute. |
Returns
static: New instance with the updated low 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.
optimum()
Section titled “optimum() ”public function optimum(float|int|string|null $value): staticSets the optimum attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float| | Optimal numeric value, or null to remove the attribute. |
Returns
static: New instance with the updated optimum attribute.
getTag()
Section titled “getTag() ”protected function getTag(): UIAwesome\Html\Interop\InlineReturns the tag enumeration for the <meter> element.
run()
Section titled “run() ”protected function run(): stringRenders the <meter> element with its content and attributes.
Returns
string: Rendered HTML for the <meter> element.