Skip to content
PHP Ecosystem
Explore

CanBeDisabled

API reference › HTML Attribute › CanBeDisabled

traitUIAwesome\Html\Attribute\CanBeDisabled
Sourcesrc/CanBeDisabled.php
Used by 8 types

Provides an immutable API for the disabled attribute.

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

MethodDescriptionDefined by
disabled()Sets the disabled attribute.CanBeDisabled
public function disabled(bool|null $value): static

Sets the disabled attribute.

Parameters

ParameterTypeDescription
$valuebool|nullDisabled state. Use true to disable, false to enable, or null to remove the attribute.

Returns

static: New instance with the updated disabled attribute.