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.

Adding a Linear Gradient

  • Select the Linear Gradient component from the Components drawer. You can open the list of components by clicking the + button next to Components.
  • Then, 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.

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
Color 3Optional. The 3rd color stop
Color 2Required. The 2nd color stop
Color 1Required. The 1st color stop

📘

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