Framework-Specific Types
Here are the supported type values that are specific to the framework.
| type | Example | Description |
|---|---|---|
Aura.Component | N/A | A single component. We recommend using Aura.Component[] instead. |
Aura.Component[] | <aura:attribute name="detail" type="Aura.Component[]"/> | Use this type to set blocks of markup. An attribute of type Aura.Component[] is called a facet. |
Aura.Action | <aura:attribute name="onclick" type="Aura.Action"/> | Use this type to pass an action to a component. See Using the Aura.Action Attribute Type. |
To set a default value for type="Aura.Component[]", put the default markup in the body of aura:attribute. For example:
-
Using the Aura.Action Attribute Type
An
Aura.Actionis a reference to an action in the framework. If a child component has anAura.Actionattribute, a parent component can pass in an action handler when it instantiates the child component in its markup. This pattern is a shortcut to pass a controller action from a parent component to a child component that it contains, and is used foron*handlers, such asonclick.
See Also