Skip to content
PHP Ecosystem
Explore

PlaceholderInterface

API reference › HTML Contracts › Form › PlaceholderInterface

interfaceUIAwesome\Html\Contracts\Form\PlaceholderInterface
Sourcesrc/Form/PlaceholderInterface.php
Implemented by 8 types

Defines the contract for form controls that expose the placeholder attribute.

Applies to controls that display a short hint describing the expected value before the user enters data.

MethodDescriptionDefined by
placeholder() abstractSets the placeholder attribute.PlaceholderInterface
abstract public function placeholder(string|Stringable|UnitEnum|null $value): static

Sets the placeholder attribute.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullExpected-value hint, or null to remove the attribute.

Returns

static: New instance with the updated placeholder attribute.