UXP swc-react theming

Hey, brand new here :wave:

I was playing around with the swc-uxp-react-starter on Github – is there no way at the moment to get the swc-react components to be theme-aware? All the guides have setting the theme in the app? I tried overriding the css using the var(--uxp-host-text-color) but I couldn’t get that to work and seems counter-intuitive?

Sorry if this is a silly question, I’m from a non-coding background :upside_down_face:

I couldn’t find any way to access theme-aware on SWC.
but SWC has theme wrapper so instead of it, I use my own custom hook and register the event which detects brightness change through batchPlay on Photoshop.
then theme variable will be changed on theme wrapper.

1 Like

The events of this topic in InDesign also worked in Photoshop. However, it is not documented, not sure if that can be depended on or not.

1 Like

Thanks for the replies @sttk3 & @shuji!

I’ll give using theme property a go and let you know how I get on – is Adobe aware that the swc-react components aren’t theme aware? I can’t figure out if its a bug or intended behavior…

1 Like

This is probably the intended behavior in this case. It is better by design for the developer to be able to change the theme when he/she intends to, rather than have the developer automatically conquered by the theme.

I can’t figure out if its a bug or intended behavior…

I often get the same impression about the this part, and have recently made that opinion to Adobe via survey. It would be nice to clearly state whether it is a bug or intended behavior, can or cannot, to be or not to be, and so on.

1 Like

Makes sense letting the developer have control, but surely there should be the option to defer to the host-application also? I would have thought a plugin UI that doesn’t match the host-theme would be a major user-experience fail…

Well that would make it too easy :sweat_smile:

1 Like