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

# LinearGradientFill

The object for displaying a linear gradient as a component background.

```
object LinearGradientFill
```

## Discussion

Use the `LinearGradientFill` object to cause the background for a component to be a linear gradient between two (or more) colors. Specify the colors you want to use and a percentage for each color along with an angle for the gradient and the behavior of the background when the person scrolls.

You can use this object in [`ComponentStyle`](/documentation/AppleNewsFormat/ComponentStyle).

### Example

```json
{
  "components": [
    {
      "role": "container",
      "style": "exampleStyle",
      "layout": {
        "ignoreDocumentMargin": true,
        "minimumHeight": 150
      },
      "components": [
        {
          "role": "title",
          "text": "Season Preview: Nobody Saw This Coming",
          "anchor": {
            "targetAnchorPosition": "center"
          }
        }
      ]
    }
  ],
  "componentStyles": {
    "exampleStyle": {
      "fill": {
        "type": "linear_gradient",
        "angle": 180,
        "colorStops": [
          {
            "color": "#00000000"
          },
          {
            "color": "#FFFFFF"
          }
        ]
      }
    }
  }
}
```

## Relationships

### Inherits From

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

---

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)