In Studio Pro, double-click the button widget to open its properties/configurations. On top, go to Appearance tab.
Then you see there you can specify classes for the button in “Common” section
Just add disabled class there as shown above. disabled is available as a built-in helper class. You don’t need to write any custom CSS
Your button will be displayed as disabled.
If it is inside a data view, then you can use dynamic classes to disable button based on some condition. You will have to write an expression like
if {condition_here} then ‘disabled’ else ‘’
Have a look at https://stackoverflow.com/questions/14750078/style-disabled-button-with-css for some idea on how to do this with the help of css.
Not sure on why you’d need to create a disabled button though. Just make sure that the button is not available based on permissions for example.
Hi Samarth,
I am not sure exactly what you need to disable the button for, but as Erwin mentioned this could be achieved by selecting the button, and on its properties settings, you can select all the roles that should be able to see the button or access a functionality. Or you can hide it entirely using the “Visibility” section.
Additionally if you want it to be visible under other conditions, you can use the “based on expression” section under the visibility configuration menu, and make specific requirements as to when it should become available.
Hope this helps.