Skip to content
PHP Ecosystem
Explore

HasDir

API reference › HTML Attribute › Global › HasDir

traitUIAwesome\Html\Attribute\Global\HasDir
Sourcesrc/Global/HasDir.php
Used by 4 types

Provides an immutable API for the dir attribute.

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

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

Sets the dir attribute.

Parameters

ParameterTypeDescription
$valuestring|UnitEnum|nullDirectionality value. Use ‘ltr’, ‘rtl’, or ‘auto’, or null to remove the attribute.

Returns

static: New instance with the updated dir attribute. Direction for predefined enum values.

Throws