Attributes connect a component to its container

Declare an attribute to observe host changes, supply a default, or derive and reflect an output. Read current values from datadom.attributes; a select expression defines the effective value.

The plain HTML buttons call setAttribute or removeAttribute outside the DCE. Watch the declaration react. Missing and empty attributes differ: ?? falls back for a missing value, not an empty string.

See also

Slices and event payloads

Form-associated values and validation