{{component}}

Renders a component chosen dynamically by name or reference.

Since Ember 4/5 (Octane) Spec ↗

Syntax

{{component nameOrCurried}} | (component "name" arg=value)

Returns

component — A component invocation, optionally curried with args.

Examples

{{#let (component (concat "field-" @type)) as |Field|}}
  <Field @value={{@value}} @onChange={{@onChange}} />
{{/let}}
{{yield (hash
  Header=(component "card-header")
  Body=(component "card-body")
)}}

Notes

The (component ...) form curries arguments to build contextual component APIs exposed via yield. Bind the result to a capitalized local with {{#let}} so it can be invoked with angle-bracket syntax.