Contents

GradientFill

The properties all gradient fill types share.

Declaration

object GradientFill

Properties

NameTypeDescription
colorStops Required[ColorStop]

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

Provide at least 2 colorStop items.

type Requiredstring

The type of gradient; for example linear_gradient.

attachmentstring

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

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.

See Also

Backgrounds for Components