CanBeHidden
API reference › HTML Attribute › Global › CanBeHidden
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.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
hidden() | Sets the hidden attribute. | CanBeHidden |
Method details
Section titled “Method details”hidden()
Section titled “hidden() ”public function hidden(bool|null $value): staticSets the hidden attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool| | Whether 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.