Skip to main content

Function: gradient()

gradient(options?: object): ElementDecorator

Decorates an element with a linear gradient text effect and optional flowing animation.

Parameters​

ParameterTypeDescription
options{ angle?: number; colors?: string[]; duration?: number; flow?: boolean; }-
options.angle?numberGradient angle in degrees (default: 90).
options.colors?string[]Array of CSS color stops for the gradient.
options.duration?numberAnimation cycle duration in seconds if flow is enabled (default: 7).
options.flow?booleanWhether the gradient should animate/flow continuously (default: true).

Returns​

ElementDecorator