{{hash}}

Creates an object literal in a template from named arguments.

Since Ember 4/5 (Octane) Spec ↗

Syntax

{{hash key1=value1 key2=value2}}

Returns

object — A reactive object with the given keys.

Examples

<UserCard @user={{hash
  name="Ada Lovelace"
  role="Engineer"
  active=true
}} />
{{yield (hash
  header=(component "card-header")
  body=(component "card-body")
)}}

Notes

{{hash}} is commonly used to pass structured arguments and to build contextual component APIs via yield. The resulting object updates when any value argument changes.