{{array}}

Creates an array literal in a template from positional arguments.

Since Ember 4/5 (Octane) Spec ↗

Syntax

{{array item1 item2 item3}}

Returns

array — A reactive array of the given items.

Examples

<Tabs @names={{array "Overview" "Activity" "Settings"}} />
{{#each (array "sm" "md" "lg") as |size|}}
  <Button @size={{size}}>{{size}}</Button>
{{/each}}

Notes

Useful for passing small inline lists without a backing class property. The array is recreated when any element argument changes.