Skip to content
PHP Ecosystem
Explore

HasDraggable

API reference › HTML Attribute › Global › HasDraggable

traitUIAwesome\Html\Attribute\Global\HasDraggable
Sourcesrc/Global/HasDraggable.php
Used by 1 type

Provides an immutable API for the draggable attribute.

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

MethodDescriptionDefined by
draggable()Sets the draggable attribute.HasDraggable
public function draggable(bool|string|UnitEnum|null $value): static

Sets the draggable attribute.

Parameters

ParameterTypeDescription
$valuebool|string|UnitEnum|nullDraggable state. Use true or false, or null to remove the attribute.

Returns

static: New instance with the updated draggable attribute. Draggable for predefined enum values.

Throws