<!--
{
  "documentType" : "article",
  "framework" : "AppleNewsFormat",
  "identifier" : "/documentation/AppleNews/nesting-components-in-an-article",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Nesting Components in an Article"
}
-->

# Nesting Components in an Article

Use container components to create the component hierarchies you need for special article designs.

## Discussion

A *nested* component is a child of the parent component that contains it. The child component is positioned and rendered relative to that parent. The size of the child components determines the minimum size of a container component.

> Tip:
> If you use an anchor to attach multiple children to the same side of their parent component, the children “stack” to create a cleanly aligned header. For information about using container components and anchors, see <doc://com.apple.applenews/documentation/AppleNews/apple-news-format-tutorials#Advanced-Design-Tutorial-2-Layout-and-Positioning>.

Many design and layout effects require you to use hierarchies of nested components. For example, you can create a layering effect by nesting content (such as a `title`) inside a parent component that has a background [`Fill`](/documentation/AppleNewsFormat/Fill). Any content displayed by the parent — as well as any content from its child components — is layered in front of the parent’s background fill, as shown in this example.

![Screenshot of an article with a header component that nests an image and a caption.](images/com.apple.applenews/media-4085703@2x.png)

Apple News Format has several container components that allow you to nest other components within them:

- [`Chapter`](/documentation/AppleNewsFormat/Chapter)
- [`Header`](/documentation/AppleNewsFormat/Header)
- [`Section`](/documentation/AppleNewsFormat/Section)
- [`Container`](/documentation/AppleNewsFormat/Container)

The [`Aside`](/documentation/AppleNewsFormat/Aside) component also lets you nest other components, but generally contains content that isn’t directly related to your article.

The following example shows a section component with two child components (`title` and `photo`) defined in its components array.

```json
{
  "role": "section",
  "components": [
  {
     "role": "title",
     "text": "A Photo",
   },
  {
     "role": "photo",
     "URL": "bundle://.",
     }
    ]
}
```

All container components have a components property whose value is an array of components. In this array, the order of the components is the order in which they appear in your article.

## See Also

  <doc://com.apple.applenews/documentation/AppleNews/about-containers>

  <doc://com.apple.applenews/documentation/AppleNews/creating-a-layered-header>

  <doc://com.apple.applenews/documentation/AppleNews/creating-a-complex-layered-header>

  <doc://com.apple.applenews/documentation/AppleNews/creating-a-floating-caption>

  <doc://com.apple.applenews/documentation/AppleNews/creating-an-inset-pull-quote>

  <doc://com.apple.applenews/documentation/AppleNews/creating-an-inset-photo>

  <doc://com.apple.applenews/documentation/AppleNews/creating-a-sidebar>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)