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

# ConditionalComponentTextStyle

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

```
object ConditionalComponentTextStyle
```

## Discussion

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

### Example

```json
{
  "components": [
    {
      "role": "title",
      "text": "Lorem Ipsum Dolor Sit Amet",
      "textStyle": "exampleTextStyle"
    }
  ],
  "componentTextStyles": {
    "exampleTextStyle": {
      "fontSize": 24,
      "conditional": [
        {
          "fontSize": 24,
          "conditions": [
            {
              "minViewportWidth": 0
            }
          ]
        },
        {
          "fontSize": 48,
          "conditions": [
            {
              "minViewportWidth": 415
            }
          ]
        },
        {
          "fontSize": 64,
          "conditions": [
            {
              "minViewportWidth": 769
            }
          ]
        }
      ]
    }
  }
}
```

## Relationships

### Inherits From

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

---

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)