Skip to content

Set style ‚Äč

The Set style action allows us to add an inline style to the element. This can be any CSS property of your choice, and by default, it will override any properties that have been added in the <style> tag.

Here is how it works:

  1. Specify the style that you want to add, i.e background-color
  2. Set the value of the style, i.e #FFFFFF

Set style action

In this example, we're setting the color of the element conditionally using a ternary operator.

(c, f, i, n, r, v, e, t) => {
  return r.get_user.ok ? 'red' : 'blue'; 

If the user is logged in, we're setting the color to red, otherwise, we are setting the color to blue.