<!--
{
  "availability" : [
    "Apple News Format: 1.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppleNewsFormat",
  "identifier" : "/documentation/AppleNewsFormat/ConditionalSection",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Apple News Format"
    ],
    "preciseIdentifier" : "data:news_format:ConditionalSection"
  },
  "title" : "ConditionalSection"
}
-->

# ConditionalSection

The object for defining conditional properties for a section component, and when the conditional properties are in effect.

```
object ConditionalSection
```

## Discussion

Use the `ConditionalSection` object to define an array of conditional section properties and the conditions under which to apply them. When a condition is met, the value of a property in `ConditionalSection` overrides the value of the same property if defined in the parent `Section` component. See [`Section`](/documentation/AppleNewsFormat/Section).

### Example

```json
{
  "components": [
    {
      "role": "section",
      "components": [
        {
          "role": "photo",
          "URL": "bundle://header.jpg"
        },
        {
          "role": "title",
          "text": "Section Title Beneath Image"
        }
      ],
      "hidden": true,
      "conditional": [
        {
          "hidden": false,
          "conditions": [
            {
              "maxViewportWidth": 415
            }
          ]
        }
      ]
    },
    {
      "role": "section",
      "components": [
        {
          "role": "header",
          "style": {
            "fill": {
              "type": "image",
              "URL": "bundle://header.jpg"
            }
          },
          "layout": {
            "minimumHeight": "75cw"
          },
          "components": [
            {
              "role": "title",
              "text": "Section Title Overlay",
              "anchor": {
                "targetAnchorPosition": "center"
              }
            }
          ]
        }
      ],
      "hidden": true,
      "conditional": [
        {
          "hidden": false,
          "conditions": [
            {
              "minViewportWidth": 416
            }
          ]
        }
      ]
    }
  ]
}
```

## Relationships

### Inherits From

[`ConditionalContainer`](/documentation/AppleNewsFormat/ConditionalContainer)

---

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)