---
schema_version: "1"
id: 838f9beb32bfd9fc6a475e2e40c07a28fd96c2ed38f892807df32d3f869f6732
title: Component Facets
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/components/components-facets.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/components-facets.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9ec6b137e3f649837ae919ad39f2d8e75e0b64dbc2498b9e7eaeab27219a9efe
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Component Facets

A facet is any attribute of type `Aura.Component[]`. Use this type as a placeholder for a block of markup. The `body` attribute is an example of a facet.

To define your own facet, add an `aura:attribute` tag of type `Aura.Component[]`, which is an array of components, to your component. For example, let's create a component called `facetHeader.cmp`.

<!-- otherprops: set_clipboard -->
```nolang
<!--c:facetHeader-->
<aura:component>
    <aura:attribute name="header" type="Aura.Component[]"/>

    <div>
        <span class="headerClass">{!v.header}</span><br/>
        <span class="bodyClass">{!v.body}</span>
    </div>
</aura:component>


```

This component has a `header` facet. Note how we position the output of the header using the `v.header` expression.

The component doesn't have any output when you access it directly as the `header` and `body` attributes aren't set. Let’s create another component, `helloFacets.cmp`, that sets these attributes.

<!-- otherprops: set_clipboard -->
```nolang
<!--c:helloFacets-->
<aura:component>
    See how we set the header facet.<br/>

    <c:facetHeader>

        This is the component body for facetHeader.

        <aura:set attribute="header">
            Hello Header!
        </aura:set>
    </c:facetHeader>

</aura:component>


```

The `aura:set` tag sets the value of the `header` attribute of `facetHeader.cmp`.

The `body` attribute is special. You don’t need to use `aura:set` if you’re setting the `body` attribute. Any free markup that’s not enclosed in one of the tags allowed in a component is assumed to be part of the body and is set in the `body` attribute.

If you use `c:helloFacets` in an app, the output is:

```nolang
See how we set the header facet.
Hello Header!
This is the component body for facetHeader.
```

**See Also**  


-   [Component Body](https://developer.salesforce.com/docs/platform/aura-platform/guide/components-body.md)
-   [Framework-Specific Types](https://developer.salesforce.com/docs/platform/aura-platform/ref/ref-attr-types-aura.md)

