Search...
style
Gets an object containing information about the button's styles.
Description
The following styles can be used with buttons:
Getting or setting a button's styles, gets or sets the styles of the button's regular state. It does not set the styles of the button's hover or disabled states.
Note: Not all styles can be used on all button designs. To determine which styles work with a specific button design, go to the Button Design panel in the Editor, choose a design, and click Customize Design. The design options that you see in the Button Design panel for your particular button are the styles you can use in your code.
Type:
StyleRead Only
Was this helpful?
Set the background color
Copy Code
1$w("#myElement").style.backgroundColor = "rgba(255,0,0,0.5)";
Get the background color
Copy Code
1let bgColor = $w("#myElement").style.backgroundColor;