---
title: GradientFill
framework: applenewsformat
role: symbol
role_heading: Object
path: applenewsformat/gradientfill
---

# GradientFill

The properties all gradient fill types share.

## Declaration

```data
object GradientFill
```

## Properties

colorStops: An array of color stops. Each stop sets a color and location along the gradient. Provide at least 2 colorStop items. type: The type of gradient; for example linear_gradient. attachment: A string that indicates how fill behaves when a person scrolls. Valid values: scroll (default). The fill scrolls along with its component. fixed. The fill stays at a fixed position within the viewport.

## Mentioned in

Supporting Dark Mode for Your Article

## Discussion

Discussion This is an abstract definition. Don’t use this object type directly; use only the object that extends it, such as LinearGradientFill. You can use this object in ComponentStyle.

## Relationships

### Inherits From

- [Fill](applenewsformat/fill.md)

### Inherited By

- [LinearGradientFill](applenewsformat/lineargradientfill.md)

## See Also

### Backgrounds for Components

- [Applying a Background to a Component](applenews/applying-a-background-to-a-component.md)
- [ImageFill](applenewsformat/imagefill.md)
- [RepeatableImageFill](applenewsformat/repeatableimagefill.md)
- [VideoFill](applenewsformat/videofill.md)
- [LinearGradientFill](applenewsformat/lineargradientfill.md)
- [Fill](applenewsformat/fill.md)
- [ColorStop](applenewsformat/colorstop.md)
