Object

GradientFill

The properties shared by all gradient fill types.

Properties

colorStops
(Required)

An array of color stops. Each stop sets a color and location along the gradient.

Provide at least 2 colorStop items.

type
string
(Required)

The type of gradient; for example linear_gradient.

attachment
string

A string that indicates how the fill should behave when a user scrolls.

Valid values:

  • scroll (default). The fill scrolls along with its component.

  • fixed. The fill stays at a fixed position within the viewport.

Discussion

This is an abstract definition. Do not use this object type directly; use only the object that extends it, for example LinearGradientFill.

This object can be used in ComponentStyle.

Relationships

Inherits From

See Also

Backgrounds for Components

Applying a Background to a Component

Change the appearance of the backgrounds in your article.

object ImageFill

The object for adding an image background fill to a component.

object RepeatableImageFill

The object for adding a background image that can be repeated.

object VideoFill

The object for adding a video background fill to a component.

object LinearGradientFill

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

object Fill

The object for setting a fill type and attachment for a component’s background fill.

object ColorStop

The object for specifying the color and location for a color stop in a gradient.