Skip to content
PHP Ecosystem
Explore

HasAutocapitalize

API reference › HTML Attribute › Global › HasAutocapitalize

traitUIAwesome\Html\Attribute\Global\HasAutocapitalize
Sourcesrc/Global/HasAutocapitalize.php
Used by 2 types

Provides an immutable API for the HTML autocapitalize attribute.

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

MethodDescriptionDefined by
autocapitalize()Sets the autocapitalize attribute.HasAutocapitalize
public function autocapitalize(string|UnitEnum|null $value): static

Sets the autocapitalize attribute.

Parameters

ParameterTypeDescription
$valuestring|UnitEnum|nullCapitalization behavior (‘none’, ‘off’, ‘sentences’, ‘on’, ‘words’, ‘characters’), or null to remove the attribute.

Returns

static: New instance with the updated autocapitalize attribute. Autocapitalize for predefined enum values.

Throws