Skip to content
PHP Ecosystem
Explore

CanBeHidden

API reference › HTML Attribute › Global › CanBeHidden

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

Provides an immutable API for the hidden attribute.

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

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

Sets the hidden attribute.

Parameters

ParameterTypeDescription
$valuebool|nullWhether to hide the element. Use true to hide, false to show, or null to remove the attribute.

Returns

static: New instance with the updated hidden attribute.