How do I programatically set a button to be outlined vs solid?

I have a button set as outline, but how do I set it as solid when pressed? It only has .setDisabled or .setVisible as action types.

Hi @lmonroe,

You can't currently do that but I'm sure they'll add that in soon.

For now you can hack your way around it by having two buttons and show/hide them based on your logic.

1 Like

Thanks, that's what I have been doing but it's such a pain as I have tons of them and it's never possible to select the button below the other one without having to go find it in the component tree. Hopefully they add this soon!

You might be able to workaround this with the "Solid" button where the background is controlled with a variable :crossed_fingers: (default variable value would be #f5f5f5).

On button click, you could set the color to be different. Then, if needed, you could have a delayed action that re-sets the color back to default

On click:

200 ms after click: