Note: This feature isn't generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

aura:component

The root of the component hierarchy. Provides a default rendering implementation.

Components are the functional units of Aura, which encapsulate modular and reusable sections of UI. They can contain other components or HTML markup. The public parts of a component are its attributes and events. Aura provides out-of-the-box components in the aura and ui namespaces.

Every component is part of a namespace. For example, the button component is saved as button.cmp in the ui namespace can be referenced in another component with the syntax <ui:button label="Submit"/>, where label="Submit" is an attribute setting.

To create a component, follow this syntax.
<aura:component>
  <!-- Optional coponent attributes here -->
  <!-- Optional HTML markup -->
  <div class="container"> 
    Hello world!
    <!-- Other components -->
  </div>
</aura:component>

Attributes

Attribute Name Attribute Type Description Required?
body Component[] The body of the component. In markup, this is everything in the body of the tag.