Linear Gradient

The Linear Gradient component allows you to apply a linear gradient background to elements in your app's UI.

You can think of the Linear Gradient component as essentially a View which has configuration options for styling the background with a color gradient.

How to use

Add one or more child components whose content you want to display inside.

In the example below, we have used it to create custom buttons and a card element.

1400

You can also use the Linear Gradient component as a background for your whole Screen.

1400

Style Properties

Style properties allow you to customize the look and feel of the component. Combinations of styles applied to components can be saved as Stylesheets to easily reuse styles throughout your app. Styles can also be set dynamically using Variables. To learn more about all the different styling properties and how they work, take a look at Intro to Styling.

Component Specific Styles

PropertyDescription
Color 1The first color in the gradient
Color 2The second color in the gradient
Color 3The third color in the gradient

Configuration Properties

PropertyDescription
Component NameTo alter the name of the component. The name is reflected in the Components tree. Defaults to 'Linear Gradient'.
End YThe ending point of Y as a number 0 - 100
End XThe ending point of X as a number 0 - 100
Start YThe starting point of Y as a number 0 - 100
Start XThe starting point of X as a number 0 - 100

📘

Web Behavior

On web, the Start and End properties only change the angle of the gradient because CSS gradients don't support changing the start and end position.

Data Properties

Conditional Display

You can conditionally display a component based on a given condition. Learn more about conditionally displaying components in the Conditional Display doc.

Examples

ConfigurationDescription
Start X: 10; Start Y: 20The gradient will start 10% from the left and 20% from the top
End X: 10; End Y: 20The gradient will end 10% from the left and 20% from the bottom