Can you reference style tokens from a code component prop?

Hey guys!

Is there a method to reference Style Tokens in a Registered Code Component Prop?

For example, referencing a color, rather than typing a hex code manually?

Hey Christopher! I’m sorry - there isn’t a way to do that at the moment, but we’re considering adding a color prop type to code components to allow that in the future.

Hey @parliamentary_trout,
I have a quick solution for you while utilizing the existing Choice API. PFA,

@yang I have a few suggestions regarding the Choice Options in the Registered Components. Please review the attached video at 4:50s mark.

While working on the above solution, I noticed that the selected option for the choice resets whenever we change the list of options.
It seems like a bug or is it an expected behavior?

PFA

CC: @yang @tiago

@zonal_mammal Thanks for that! Yes that does look like a bug

Thank you! I like your method, sir.

Nice solution! Thank you, @zonal_mammal!