Skip to content
PHP Ecosystem
Explore

HasSize

API reference › HTML › Form › Mixin › HasSize

traitUIAwesome\Html\Form\Mixin\HasSize
Uses traitsHasIntLikeAttribute
Sourcesrc/Form/Mixin/HasSize.php
Used by 7 types

Provides an immutable API for the size attribute.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/size.

MethodDescriptionDefined by
size()Sets the size attribute.HasSize
public function size(int|string|Stringable|UnitEnum|null $value): static

Sets the size attribute.

Parameters

ParameterTypeDescription
$valueint|string|Stringable|UnitEnum|nullSize value. Must be ’>= 0’, or null to remove the attribute.

Returns

static: New instance with the updated size attribute.

Throws