Programmatically change Button icons

Use case: A play button with a play-circle icon. When user pushes play, it changes to pause-circle.

That way you only need one button. I can do this with two buttons and toggle visibility, but that requires more wiring and might have layout considerations.

1 Like

Hey @bradlymathews, thanks for the feedback! I'm guessing you mean the Prefix icon or Suffix icon right?

While we don't support that being dynamic (yet), if you can stand using emoji as the button label, you could make a button dynamic with something like this:

{{true ? '▶️' : '⏸'}}

Well I just revealed my age, I had no idea you could just insert emoji anywhere you wanted. I knew about special symbols, but the win-; hot key also does those and is a much easier way than I was doing it.

Hey @bradlymathews! We just rolled out proper support for dynamic icons! Click the "fx" toggle next to any icon field, and include an icon in your code by typing /icon.

Dynamic Play/Pause

1 Like