How to use Spectrum components in UXP plugin?

I think XD might have exact same issue as Ps - Spectrum Web Components (WC) might actually be not supported. I believe you saw my post about theme awareness, but that’s not the main issue.

  • Both Ps and XD have the same docs, that you can use Spectrum WC
  • Also both Ps and XD have separate docs on Spectrum UXP (not to mix up with Spectrum WC)

I tried to make WC work on Ps, but failed miserably. Also, not only failed to make WC work, it seems that what actually is supported in Ps, is not Spectrum UXP either. Some supported components is a mix of UXP and WC. Very good example is sp-picker:

  • Docs say that sp-dropdown is supported in Spectrum UXP
  • Docs don’t even have sp-picker as supported component in Spectrum UXP
  • sp-picker is a pure Spectrum WC
  • Ps however supports sp-picker with a mixed inner HTML syntax of sp-dropdown
  • Ps does not work with sp-dropdown as one would expect

So basically Spectrum is a mess (at least in Photoshop) and I couldn’t make WC properly work there at all. Almost all sp-... elements for me were trial and error to achieve what I want.

Figured I’d share this experience, even if it’s for Ps

2 Likes